OmniSciDB  2b310ab3b2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
types.h File Reference
#include <sstream>
#include <string>
#include <thread>
#include <vector>
#include "Logger/Logger.h"
+ Include dependency graph for types.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CHUNK_KEY_DB_IDX   0
 
#define CHUNK_KEY_TABLE_IDX   1
 
#define CHUNK_KEY_COLUMN_IDX   2
 
#define CHUNK_KEY_FRAGMENT_IDX   3
 

Typedefs

using ChunkKey = std::vector< int >
 

Functions

bool hasTableKey (const ChunkKey &key)
 
ChunkKey getTableKey (const ChunkKey &key)
 
bool isTableKey (const ChunkKey &key)
 
bool isColumnKey (const ChunkKey &key)
 
bool isVarLenKey (const ChunkKey &key)
 
bool isVarLenDataKey (const ChunkKey &key)
 
bool isVarLenIndexKey (const ChunkKey &key)
 
std::string showChunk (const ChunkKey &key)
 

Macro Definition Documentation

Typedef Documentation

using ChunkKey = std::vector<int>

Definition at line 37 of file types.h.

Function Documentation

ChunkKey getTableKey ( const ChunkKey key)
inline

Definition at line 48 of file types.h.

References CHECK(), CHUNK_KEY_DB_IDX, CHUNK_KEY_TABLE_IDX, and hasTableKey().

Referenced by foreign_storage::ForeignStorageCache::cacheChunk(), foreign_storage::ForeignStorageCache::eraseChunkByIterator(), foreign_storage::ForeignStorageCache::evictThenEraseChunk(), and foreign_storage::ForeignStorageCache::getCachedChunkIfExists().

48  {
49  CHECK(hasTableKey(key));
51 }
std::vector< int > ChunkKey
Definition: types.h:37
#define CHUNK_KEY_DB_IDX
Definition: types.h:39
CHECK(cgen_state)
#define CHUNK_KEY_TABLE_IDX
Definition: types.h:40
bool hasTableKey(const ChunkKey &key)
Definition: types.h:44

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool hasTableKey ( const ChunkKey key)
inline

Definition at line 44 of file types.h.

Referenced by getTableKey().

44  {
45  return key.size() >= 2;
46 }

+ Here is the caller graph for this function:

bool isColumnKey ( const ChunkKey key)
inline

Definition at line 57 of file types.h.

57  {
58  return key.size() == 3;
59 }
bool isVarLenDataKey ( const ChunkKey key)
inline

Definition at line 65 of file types.h.

Referenced by foreign_storage::ForeignStorageCache::cacheMetadataVec(), and foreign_storage::ForeignStorageMgr::refreshTableInCache().

65  {
66  return key.size() == 5 && key[4] == 1;
67 }

+ Here is the caller graph for this function:

bool isVarLenIndexKey ( const ChunkKey key)
inline

Definition at line 69 of file types.h.

69  {
70  return key.size() == 5 && key[4] == 2;
71 }
bool isVarLenKey ( const ChunkKey key)
inline

Definition at line 61 of file types.h.

Referenced by foreign_storage::ForeignStorageCache::cacheMetadataVec(), and foreign_storage::ForeignStorageMgr::refreshTableInCache().

61  {
62  return key.size() == 5;
63 }

+ Here is the caller graph for this function:

std::string showChunk ( const ChunkKey key)
inline