MCPcopy Create free account
hub / github.com/crawl/crawl / open_db

Method open_db

crawl-ref/source/database.cc:194–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194bool TextDB::open_db()
195{
196 if (_db)
197 return true;
198
199 const string full_db_path = _db_cache_path(_db_name, lang());
200 _db = dbm_open(full_db_path.c_str(), O_RDONLY, 0660);
201 if (!_db)
202 return false;
203
204 timestamp = _query_database(*this, "TIMESTAMP", false, false, true);
205 if (timestamp.empty())
206 return false;
207
208 return true;
209}
210
211void TextDB::init()
212{

Callers

nothing calls this directly

Calls 4

_db_cache_pathFunction · 0.85
dbm_openFunction · 0.85
_query_databaseFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected