dce-mango
Version:
Harvard DCE's Non-relational DB Wrapper.
22 lines (19 loc) • 497 B
text/typescript
// Import Mongo
import MongoDB from 'mongodb';
/**
* Type describing the (global) state of a DB.
* @author Benedikt Arnarsson
*/
type DbState = {
// Whether the DB connection has been started (via initMango)
isInitialized: boolean,
// Optional version tag
schemaVersionTag: string,
// Promise containing a list of collection names
initDB: Promise<string[]>,
// The DB itself
db: MongoDB.Db;
// The client connection
client: MongoDB.MongoClient,
};
export default DbState;