96 std::string file_name);
File * getFile(FileId file_id)
Retuns File object identified by the given FileId.
CatType
Definition: swatdb_types.h:98
void _closeAllFiles()
Flushes and closes all underlying files in the system, saving db state.
void _removeAllFiles()
Removes all Files in the system and their underlying storage from the database.
void _loadFile(FileId fid)
Loads an existing relation into the system, whose contents are already stored in a file on disk...
~FileManager()
Destructor.
void removeFile(FileId file_id)
Deletes a File or Index from the system and removes its underlying storage from the database...
File * getRelation(std::string name)
Retuns File object identified by the relation name.
FileManager(Catalog *cat, BufferManager *buf_mgr, bool load=false)
Creates SwatDB FileManager, the interface to the File layer.
Catalog * catalog
Definition: filemgr.h:245
BufferManager * buf_mgr
Definition: filemgr.h:250
void _loadAllFiles()
Loads all Files listed in the Catalog.
FileId createRelation(std::string name, Schema *schema, CatType type, std::string file_name)
Creates a new Relation in the system. Adds an entry for the new file to the Catalog and creates the u...
Definition: catalog.h:134
std::uint32_t FileId
Definition: swatdb_types.h:29
void removeRelation(std::string name)
Deletes relation from the system and removes its underlying storage from the database.