Covalent Bond  0.0.1-alpha
'covalent bond' is a data middle office. As a 2022-2023 Fall SWE final project.
Classes | Macros | Typedefs | Enumerations | Functions
cbTable.hpp File Reference

the virtual table and shared table. More...

#include <variant>
#include "../../pch.hpp"
#include "sol/sol.hpp"
#include <workflow/MySQLResult.h>
Include dependency graph for cbTable.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cbCell
 
struct  cbTableHead
 
struct  cbShape< Dims >
 
struct  __metaMatrix< Dims >
 row major table. More...
 
struct  cbTableRow
 
struct  cbTableCol
 
class  cbTable
 
class  cbMySQLField
 A copy move from workflow MySQLResult.h and .inl file. More...
 
class  cbMySQLCell
 
class  cbVirtualSharedTable
 cbVirtualSharedTable is a container of shared memory. More...
 
class  cbVirtualTable
 cbVirtualTable works as a reference from shared memory. It only use a shape and SqlCell to define different tables. More...
 
struct  cbOutputTableStruct
 

Macros

#define Seq(x, y)   std::pair<int32_t, int32_t>(x, y)
 ! More...
 

Typedefs

typedef std::variant< int32_t, float, std::string, bool > __metaObj
 _WIN32 More...
 
typedef std::variant< std::string, float, double, int, unsigned long long > __cbMySQLMeta
 

Enumerations

enum  cbTableSlice : uint8_t { cbTableSlice::all = 0, cbTableSlice::seq = 1, cbTableSlice::no = 2 }
 
enum  typeType : uint32_t { typeType::Int = 0, typeType::Float = 1, typeType::String = 2, typeType::Bool = 3 }
 
enum  cbMySQLType {
  cbMySQLType::Float, cbMySQLType::Double, cbMySQLType::Int, cbMySQLType::ULL,
  cbMySQLType::String, cbMySQLType::Date, cbMySQLType::Time, cbMySQLType::DataTime,
  cbMySQLType::Null
}
 

Functions

cbShape< 2 > makeShapeRow (int32_t a)
 
cbShape< 2 > makeShapeCol (int32_t a)
 
cbShape< 2 > makeShapeFull (int32_t a, int32_t b)
 
void mallocMetaMatrix (cbTable &rhs)
 
void mallocMetaMatrix (cbTableCol &rhs)
 
void mapShared2Virtual (cbVirtualSharedTable *sharedT, cbVirtualTable *virtualT)
 
template<typename T >
auto fetchShapeIndex (T &c, int32_t idx) -> int32_t &
 
template<typename T >
auto storeShapeIndex (T &c, int32_t idx, int32_t const &v) -> void
 
std::vector< cbMySQLCell * > __luaPackedCellAsVec (cbMySQLCell *v=nullptr)
 
std::vector< std::string > __luaPackedStringAsVec ()
 

Detailed Description

the virtual table and shared table.

Author
chenghua Wang (cheng.nosp@m.hua..nosp@m.wang..nosp@m.edu@.nosp@m.gmail.nosp@m..com)
Version
0.1
Date
2022-11-06

Definition in file cbTable.hpp.

Macro Definition Documentation

◆ Seq

#define Seq (   x,
 
)    std::pair<int32_t, int32_t>(x, y)

!

Definition at line 38 of file cbTable.hpp.

Typedef Documentation

◆ __cbMySQLMeta

typedef std::variant<std::string, float, double, int, unsigned long long> __cbMySQLMeta

Definition at line 369 of file cbTable.hpp.

◆ __metaObj

typedef std::variant<int32_t, float, std::string, bool> __metaObj

_WIN32

defined(unix) && defined(clang) !

Definition at line 35 of file cbTable.hpp.

Enumeration Type Documentation

◆ cbMySQLType

enum cbMySQLType
strong
Enumerator
Float 
Double 
Int 
ULL 
String 
Date 
Time 
DataTime 
Null 

Definition at line 375 of file cbTable.hpp.

◆ cbTableSlice

enum cbTableSlice : uint8_t
strong
Enumerator
all 
seq 
no 

Definition at line 44 of file cbTable.hpp.

◆ typeType

enum typeType : uint32_t
strong
Enumerator
Int 
Float 
String 
Bool 

Definition at line 54 of file cbTable.hpp.

Function Documentation

◆ __luaPackedCellAsVec()

std::vector<cbMySQLCell*> __luaPackedCellAsVec ( cbMySQLCell v = nullptr)

Definition at line 467 of file cbTable.cpp.

Referenced by cb::graph::cbComputeGraph::cbComputeGraph().

Here is the caller graph for this function:

◆ __luaPackedStringAsVec()

std::vector<std::string> __luaPackedStringAsVec ( )

Definition at line 474 of file cbTable.cpp.

Referenced by cb::graph::cbComputeGraph::cbComputeGraph().

Here is the caller graph for this function:

◆ fetchShapeIndex()

template<typename T >
auto fetchShapeIndex ( T &  c,
int32_t  idx 
) -> int32_t&

Definition at line 793 of file cbTable.hpp.

Referenced by cb::graph::cbComputeGraph::cbComputeGraph().

Here is the caller graph for this function:

◆ makeShapeCol()

cbShape<2> makeShapeCol ( int32_t  a)
inline
Parameters
a
Returns
cbShape<2>

Definition at line 184 of file cbTable.hpp.

Referenced by bindAllFuncByDefault(), and cbTable::getCol().

Here is the caller graph for this function:

◆ makeShapeFull()

cbShape<2> makeShapeFull ( int32_t  a,
int32_t  b 
)
inline
Parameters
a
b
Returns
cbShape<2>

Definition at line 198 of file cbTable.hpp.

Referenced by bindAllFuncByDefault(), cbVirtualTable::getCol(), cbVirtualTable::getRow(), mapShared2Virtual(), and cbTable::operator()().

Here is the caller graph for this function:

◆ makeShapeRow()

cbShape<2> makeShapeRow ( int32_t  a)
inline
Parameters
a
Returns
cbShape<2>

Definition at line 171 of file cbTable.hpp.

Referenced by bindAllFuncByDefault(), and cbTable::getRow().

Here is the caller graph for this function:

◆ mallocMetaMatrix() [1/2]

void mallocMetaMatrix ( cbTable rhs)
inline
Parameters
rhs

Definition at line 343 of file cbTable.hpp.

References __metaMatrix< Dims >::__dataptr, __metaMatrix< Dims >::m_shape, and cbTable::setThisAsTrueDataContainer().

Here is the call graph for this function:

◆ mallocMetaMatrix() [2/2]

void mallocMetaMatrix ( cbTableCol rhs)
inline
Parameters
rhs

Definition at line 353 of file cbTable.hpp.

References __metaMatrix< Dims >::__dataptr, __metaMatrix< Dims >::m_shape, cbTableCol::setStride(), and cbTableCol::setThisAsTrueDataContainer().

Here is the call graph for this function:

◆ mapShared2Virtual()

void mapShared2Virtual ( cbVirtualSharedTable sharedT,
cbVirtualTable virtualT 
)

◆ storeShapeIndex()

template<typename T >
auto storeShapeIndex ( T &  c,
int32_t  idx,
int32_t const &  v 
) -> void

Definition at line 798 of file cbTable.hpp.

Referenced by cb::graph::cbComputeGraph::cbComputeGraph().

Here is the caller graph for this function: