#include <cstdint>
Go to the source code of this file.
|
typedef std::uint32_t | FileId |
|
typedef std::uint32_t | PageNum |
|
typedef std::uint32_t | FrameId |
| Index of each frame in the bufferpool of BufferManager.
|
|
typedef std::uint32_t | SlotId |
|
typedef std::uint32_t | FieldId |
|
|
enum | FieldType { IntFieldT,
FloatFieldT,
StringFieldT
} |
|
enum | CatType {
INVALID_CAT_TYPE,
HeapFileT,
SortedFileT,
BPlusTreeT,
HashIndexT
} |
|
◆ FieldId
Unique identifer of each field in a record
◆ FileId
SwatDB Types and Configuration. Definition of commonly used data types and constants used throughout the system Types defined by specific layers may be defined in interface .h files. Runtime unique identifer of each file. Reset everytime the system is rebooted.
◆ PageNum
Unique identifer of each page in a single Unix file.
◆ CatType
Catalog entry types: one for each type of file or index in the system IMPORTANT: since the type is encoded in saved meta files on disk, you should ONLY APPEND to this list (don't remove a type, nor add a new one in the middle)
◆ FieldType
◆ BUF_SIZE
const std::uint32_t BUF_SIZE = 1024 |
Number of pages that can be held in the buffer pool.
◆ FILE_MAX_CAPACITY
const std::uint32_t FILE_MAX_CAPACITY = 10000000 |
SwatDB Constants Maximum capacity of each Unix file in bytes
◆ HEADER_PAGE_NUM
const std::uint32_t HEADER_PAGE_NUM = 0 |
PageNum of header page. Is 0 by default per the current implementation, but may change in the future.
◆ INVALID_FILE_ID
Default constant for PageNum that exceeds its maximum.
◆ INVALID_PAGE_ID
Used for initializing a PageId to a default value that is not used
◆ INVALID_PAGE_NUM
Default constant for FileId that exceeds its maximum.
◆ INVALID_RECORD_ID
◆ INVALID_SLOT_ID
◆ INVALID_SLOT_OFFSET
const std::uint32_t INVALID_SLOT_OFFSET = PAGE_SIZE+1 |
Value slot offset of SlotInfo is set to when the slot is not valid. Used by inherited classes of Page class
◆ MAX_FILE_NAME_LEN
const std::uint32_t MAX_FILE_NAME_LEN = 511 |
Maximum length of a file name string in the system (not counting \0
)
◆ MAX_FILE_NUM
const std::uint32_t MAX_FILE_NUM = 1000 |
Maximum number of Unix files that can be created during one run of SwatDB (a real long running system would have much larger value for this)
◆ MAX_HEAP_PAGE_LOAD
const float MAX_HEAP_PAGE_LOAD = 0.9 |
Maximum load factor (free space/total space) of heap page. If the load factor of a heappage exceeds this value, it is considered full.
◆ MAX_PAGE_NUM
const std::uint32_t MAX_PAGE_NUM |
Initial value:const std::uint32_t FILE_MAX_CAPACITY
Definition: swatdb_types.h:115
const std::uint32_t PAGE_SIZE
Definition: swatdb_types.h:129
Maximum number of pages that could fit in a single Unix file, excluding the file header metadata. If the size of the SerializedFileHeader struct is modified, this equation also has to be modified. This equation accounts for extra space occupied by 2 std::uint32_t (size and capacity) fields of the header metadata and space occupied by bitmap (1 bit per Page, but 8 is multiplied to prevent truncation due to int division). Finally, the MAX_PAGE_NUM is "rounded down" as the disk header information has to fit in units of PAGE_SIZE.
◆ MAX_RECORD_SIZE
const std::uint32_t MAX_RECORD_SIZE = PAGE_SIZE - (8 * sizeof(std::uint32_t)) |
The maximum record size that can fit in a single page. It accounts for the minimum space taken by the metadata of HeapPage, so if metadata structures are modified, this value should also be modified.
◆ PAGE_SIZE
const std::uint32_t PAGE_SIZE = 1024 |
The size of a page in bytes