1 #ifndef CATALOG_PERSISTENTCATCACHE_H
2 #define CATALOG_PERSISTENTCATCACHE_H
154 std::shared_ptr<const TableDesc> tabdesc,
155 std::shared_ptr<const IndexDesc> idxdesc);
BulkLoadIterator is an interface for providing (key, RecordId) pairs for index bulk loading.
Definition: BulkLoadIterator.h:17
CatCacheBase implements the common routines and public interfaces for accessing and modifying the sys...
Definition: CatCacheBase.h:103
Definition: PersistentCatCache.h:15
void MarkPageDirty(PageHandle &pghandle)
Marks a page pointed by the page handle as dirty.
Definition: PersistentCatCache.cpp:113
void UpdateCurrentCatEntry(CatFileIterator &iter, Record &rec)
Updates the current catalog entry pointed by the iterator with the record rec.
Definition: PersistentCatCache.cpp:156
Table::Iterator CatFileIterator
An opaque handle for iterating a catalog file.
Definition: PersistentCatCache.h:98
const char * GetCurrentCatEntry(CatFileIterator &iter)
Returns the current catalog entry pointed by the iterator as a buffer pointer.
Definition: PersistentCatCache.cpp:146
void ReleasePage(PageHandle &pghandle)
Releases the pin over the page pointed by the page handle.
Definition: PersistentCatCache.cpp:118
void _CreateTableIfNullForFileHandle(FileHandle &fh, FieldOffset reclen)
Creates the Table object in the file handle using a fake table descriptor.
Definition: PersistentCatCache.cpp:178
bool NextCatEntry(CatFileIterator &iter)
Tries to move the iterator to the next row and returns whether such a row exists.
Definition: PersistentCatCache.cpp:141
PersistentCatCache()
Definition: PersistentCatCache.cpp:16
RecordId GetCurrentCatEntryRecordId(CatFileIterator &iter)
Returns the current catalog entry's record ID.
Definition: PersistentCatCache.cpp:151
CatFileIterator IterateCatEntryFrom(FileHandle &fh, RecordId rid)
Creates an iterator that starts at rid.
Definition: PersistentCatCache.cpp:135
PageNumber m_dbmetapg_pid
The page number of the DB meta page, which is the first page of the DB meta file.
Definition: PersistentCatCache.h:168
FileHandle OpenCatalogFile(FileId fid, const TableDesc *tabdesc)
Opens a catalog file for access.
Definition: PersistentCatCache.cpp:61
void AppendRecord(FileHandle &fh, Record &rec)
Appends a record to the catalog file specified by the file ID.
Definition: PersistentCatCache.cpp:123
PageHandle GetFirstPage(FileHandle &fh, char **pagebuf)
Returns a handle to the first page in the unformatted catalog file with it pinned in the memory.
Definition: PersistentCatCache.cpp:103
ScopedBufferId PageHandle
An opaque handle for a data page in an unformatted catalog file.
Definition: PersistentCatCache.h:62
void CloseCatalogFile(FileHandle &fh)
Closes a catalog file pointed by the file handle.
Definition: PersistentCatCache.cpp:97
BulkLoadIterator * GetBulkLoadIterator(FileHandle &fh, std::shared_ptr< const TableDesc > tabdesc, std::shared_ptr< const IndexDesc > idxdesc)
Returns a BulkLoadIterator for bulk loading a systable index.
Definition: PersistentCatCache.cpp:168
void EndIterateCatEntry(CatFileIterator &iter)
Releses any resource associated with the catalog file iterator.
Definition: PersistentCatCache.cpp:162
CatFileIterator IterateCatEntry(FileHandle &fh)
Creates an iterator over the catalog file specified by the file ID.
Definition: PersistentCatCache.cpp:129
FileId CreateCatalogFile(bool format_heapfile)
Creates a new catalog file and returns its file ID.
Definition: PersistentCatCache.cpp:20
Definition: TableDesc.h:11
The Iterator interface for scanning the heap file.
Definition: Table.h:185
int16_t FieldOffset
Definition: tdb_base.h:211
uint32_t FileId
The file ID.
Definition: tdb_base.h:221
uint32_t PageNumber
Definition: tdb_base.h:213
An opaque handle for a catalog file.
Definition: PersistentCatCache.h:38
std::unique_ptr< Table > m_table
Definition: PersistentCatCache.h:43
FileId m_fid
Definition: PersistentCatCache.h:40
The record ID of a record on a page is a pair of ‘(PageNumber, SlotId)’.
Definition: Record.h:17