nostrdb/index: create kind+timestamp index database
We don't build the index yet, but create the database like the others. Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -2208,6 +2208,11 @@ static int ndb_init_lmdb(const char *filename, struct ndb_lmdb *lmdb, size_t map
|
||||
}
|
||||
mdb_set_compare(txn, lmdb->dbs[NDB_DB_PROFILE_PK], ndb_tsid_compare);
|
||||
|
||||
if ((rc = mdb_dbi_open(txn, "note_kind", tsid_flags, &lmdb->dbs[NDB_DB_NOTE_KIND]))) {
|
||||
fprintf(stderr, "mdb_dbi_open id failed: %s\n", mdb_strerror(rc));
|
||||
return 0;
|
||||
}
|
||||
mdb_set_compare(txn, lmdb->dbs[NDB_DB_NOTE_KIND], ndb_u64_tsid_compare);
|
||||
|
||||
// Commit the transaction
|
||||
if ((rc = mdb_txn_commit(txn))) {
|
||||
|
||||
Reference in New Issue
Block a user