OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
flatbuffer::Column< RowType, RowStruct > Struct Template Reference

#include <heavydbTypes.h>

Public Member Functions

 Column (int8_t *flatbuffer, int64_t num_rows)
 
DEVICE bool isNull (int64_t index) const
 
DEVICE int64_t size () const
 
DEVICE void setNull (int64_t index)
 
DEVICE RowType getItem (const int64_t index) const
 
DEVICE RowType operator[] (const unsigned int index) const
 
DEVICE RowStruct operator() (const unsigned int index) const
 
DEVICE void setItem (int64_t index, const RowType &item)
 
DEVICE void setItem (int64_t index, const RowStruct &item)
 
int64_t getNofValues () const
 
DEVICE void concatItem (int64_t index, const RowType &item)
 
DEVICE void concatItem (int64_t index, const RowStruct &item)
 
DEVICE RowType getItem (const int64_t index, const int64_t extra_numel) const
 
const SQLTypeInfoLitegetTypeInfo () const
 
std::string toString () const
 

Public Attributes

int8_t * flatbuffer_
 
int64_t num_rows_
 

Detailed Description

template<typename RowType, typename RowStruct>
struct flatbuffer::Column< RowType, RowStruct >

Definition at line 1218 of file heavydbTypes.h.

Constructor & Destructor Documentation

template<typename RowType, typename RowStruct>
flatbuffer::Column< RowType, RowStruct >::Column ( int8_t *  flatbuffer,
int64_t  num_rows 
)
inline

Definition at line 1222 of file heavydbTypes.h.

1223  : flatbuffer_(flatbuffer), num_rows_(num_rows) {}

Member Function Documentation

template<typename RowType, typename RowStruct>
DEVICE void flatbuffer::Column< RowType, RowStruct >::concatItem ( int64_t  index,
const RowType &  item 
)
inline

Definition at line 1289 of file heavydbTypes.h.

1289  {
1290  RowType this_item = getItem(index);
1291  this_item += item;
1292  }
DEVICE RowType getItem(const int64_t index) const
template<typename RowType, typename RowStruct>
DEVICE void flatbuffer::Column< RowType, RowStruct >::concatItem ( int64_t  index,
const RowStruct &  item 
)
inline

Definition at line 1294 of file heavydbTypes.h.

1294  {
1295  RowType this_item = getItem(index);
1296  this_item += item;
1297  }
DEVICE RowType getItem(const int64_t index) const
template<typename RowType, typename RowStruct>
DEVICE RowType flatbuffer::Column< RowType, RowStruct >::getItem ( const int64_t  index) const
inline

Definition at line 1255 of file heavydbTypes.h.

Referenced by flatbuffer::Column< Geo::MultiLineString, GeoMultiLineString >::concatItem(), flatbuffer::Column< Geo::MultiLineString, GeoMultiLineString >::operator[](), and flatbuffer::Column< Geo::MultiLineString, GeoMultiLineString >::setItem().

1255  {
1256  RowType row{{flatbuffer_, {index}, 1}};
1257  return row;
1258  }

+ Here is the caller graph for this function:

template<typename RowType, typename RowStruct>
DEVICE RowType flatbuffer::Column< RowType, RowStruct >::getItem ( const int64_t  index,
const int64_t  extra_numel 
) const
inline

Definition at line 1300 of file heavydbTypes.h.

1300  {
1301  auto result = (*this)[index];
1302  if (extra_numel >= 0) {
1303  result.extend(nullptr, extra_numel, /*assing=*/false);
1304  }
1305  return result;
1306  }
template<typename RowType, typename RowStruct>
int64_t flatbuffer::Column< RowType, RowStruct >::getNofValues ( ) const
inline

Definition at line 1284 of file heavydbTypes.h.

Referenced by ct_linestringn__cpu_(), ct_make_multipolygon__cpu_(), ct_make_polygon3__cpu_(), ct_polygonn__cpu_(), ct_to_multilinestring__cpu_(), and ct_to_polygon__cpu_().

1284  {
1286  return m.getValuesCount();
1287  }

+ Here is the caller graph for this function:

template<typename RowType, typename RowStruct>
const SQLTypeInfoLite* flatbuffer::Column< RowType, RowStruct >::getTypeInfo ( ) const
inline

Definition at line 1308 of file heavydbTypes.h.

1308  {
1310  const auto* ti = reinterpret_cast<const SQLTypeInfoLite*>(m.get_user_data_buffer());
1311  if (ti == nullptr) {
1312 #ifndef __CUDACC__
1313  throw std::runtime_error(::typeName(this) +
1314  " getTypeInfo failed: no user data buffer");
1315 #endif
1316  }
1317  return ti;
1318  }
std::string typeName(const T *v)
Definition: toString.h:106
template<typename RowType, typename RowStruct>
DEVICE bool flatbuffer::Column< RowType, RowStruct >::isNull ( int64_t  index) const
inline

Definition at line 1226 of file heavydbTypes.h.

Referenced by ct_linestringn__cpu_(), ct_make_multipolygon__cpu_(), ct_make_polygon3__cpu_(), ct_polygonn__cpu_(), ct_to_multilinestring__cpu_(), and ct_to_polygon__cpu_().

1226  {
1228  bool is_null = false;
1229  auto status = m.isNull(index, is_null);
1230 #ifndef __CUDACC__
1231  if (status != FlatBufferManager::Status::Success) {
1232  throw std::runtime_error("isNull failed: " + ::toString(status));
1233  }
1234 #endif
1235  return is_null;
1236  }
CONSTEXPR DEVICE bool is_null(const T &value)
std::string toString() const

+ Here is the caller graph for this function:

template<typename RowType, typename RowStruct>
DEVICE RowStruct flatbuffer::Column< RowType, RowStruct >::operator() ( const unsigned int  index) const
inline

Definition at line 1266 of file heavydbTypes.h.

1266  {
1267  return (*this)[index];
1268  }
template<typename RowType, typename RowStruct>
DEVICE RowType flatbuffer::Column< RowType, RowStruct >::operator[] ( const unsigned int  index) const
inline

Definition at line 1261 of file heavydbTypes.h.

1261  {
1262  return getItem(static_cast<int64_t>(index));
1263  }
DEVICE RowType getItem(const int64_t index) const
template<typename RowType, typename RowStruct>
DEVICE void flatbuffer::Column< RowType, RowStruct >::setItem ( int64_t  index,
const RowType &  item 
)
inline

Definition at line 1271 of file heavydbTypes.h.

Referenced by ColumnTextEncodingNone_setItem_fromBuffer(), ct_linestringn__cpu_(), and ct_polygonn__cpu_().

1271  {
1272  RowType this_item = getItem(index);
1273  this_item = item;
1274  }
DEVICE RowType getItem(const int64_t index) const

+ Here is the caller graph for this function:

template<typename RowType, typename RowStruct>
DEVICE void flatbuffer::Column< RowType, RowStruct >::setItem ( int64_t  index,
const RowStruct &  item 
)
inline

Definition at line 1277 of file heavydbTypes.h.

1277  {
1278  RowType this_item = getItem(index);
1279  this_item = item;
1280  }
DEVICE RowType getItem(const int64_t index) const
template<typename RowType, typename RowStruct>
DEVICE void flatbuffer::Column< RowType, RowStruct >::setNull ( int64_t  index)
inline

Definition at line 1244 of file heavydbTypes.h.

Referenced by ct_linestringn__cpu_(), ct_make_linestring2__cpu_(), ct_make_multipolygon__cpu_(), ct_make_polygon3__cpu_(), ct_polygonn__cpu_(), ct_to_multilinestring__cpu_(), and ct_to_polygon__cpu_().

1244  {
1246  auto status = m.setNull(index);
1247 #ifndef __CUDACC__
1248  if (status != FlatBufferManager::Status::Success) {
1249  throw std::runtime_error("setNull failed: " + ::toString(status));
1250  }
1251 #endif
1252  }
std::string toString() const

+ Here is the caller graph for this function:

template<typename RowType, typename RowStruct>
DEVICE int64_t flatbuffer::Column< RowType, RowStruct >::size ( ) const
inline

Definition at line 1239 of file heavydbTypes.h.

Referenced by ct_linestringn__cpu_(), ct_make_multipolygon__cpu_(), ct_make_polygon3__cpu_(), ct_polygonn__cpu_(), ct_to_multilinestring__cpu_(), and ct_to_polygon__cpu_().

1239  {
1240  return num_rows_;
1241  }

+ Here is the caller graph for this function:

template<typename RowType, typename RowStruct>
std::string flatbuffer::Column< RowType, RowStruct >::toString ( ) const
inline

Definition at line 1321 of file heavydbTypes.h.

Referenced by flatbuffer::Column< Geo::MultiLineString, GeoMultiLineString >::isNull(), and flatbuffer::Column< Geo::MultiLineString, GeoMultiLineString >::setNull().

1321  {
1323  return ::typeName(this) + "(" + m.toString() +
1324  ", num_rows=" + std::to_string(num_rows_) + ")";
1325  }
std::string to_string(char const *&&v)
std::string typeName(const T *v)
Definition: toString.h:106

+ Here is the caller graph for this function:

Member Data Documentation

template<typename RowType, typename RowStruct>
int64_t flatbuffer::Column< RowType, RowStruct >::num_rows_

The documentation for this struct was generated from the following file: