OmniSciDB  f17484ade4
 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 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 1216 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 1220 of file heavydbTypes.h.

1221  : 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 1287 of file heavydbTypes.h.

1287  {
1288  RowType this_item = getItem(index);
1289  this_item += item;
1290  }
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 1253 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().

1253  {
1254  RowType row{{flatbuffer_, {index}, 1}};
1255  return row;
1256  }

+ 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 1293 of file heavydbTypes.h.

1293  {
1294  auto result = (*this)[index];
1295  if (extra_numel >= 0) {
1296  result.extend(nullptr, extra_numel, /*assing=*/false);
1297  }
1298  return result;
1299  }
template<typename RowType, typename RowStruct>
int64_t flatbuffer::Column< RowType, RowStruct >::getNofValues ( ) const
inline

Definition at line 1282 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_().

1282  {
1284  return m.getValuesCount();
1285  }

+ 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 1301 of file heavydbTypes.h.

1301  {
1303  const auto* ti = reinterpret_cast<const SQLTypeInfoLite*>(m.get_user_data_buffer());
1304  if (ti == nullptr) {
1305 #ifndef __CUDACC__
1306  throw std::runtime_error(::typeName(this) +
1307  " getTypeInfo failed: no user data buffer");
1308 #endif
1309  }
1310  return ti;
1311  }
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 1224 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_().

1224  {
1226  bool is_null = false;
1227  auto status = m.isNull(index, is_null);
1228 #ifndef __CUDACC__
1229  if (status != FlatBufferManager::Status::Success) {
1230  throw std::runtime_error("isNull failed: " + ::toString(status));
1231  }
1232 #endif
1233  return is_null;
1234  }
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 1264 of file heavydbTypes.h.

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

Definition at line 1259 of file heavydbTypes.h.

1259  {
1260  return getItem(static_cast<int64_t>(index));
1261  }
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 1269 of file heavydbTypes.h.

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

1269  {
1270  RowType this_item = getItem(index);
1271  this_item = item;
1272  }
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 1275 of file heavydbTypes.h.

1275  {
1276  RowType this_item = getItem(index);
1277  this_item = item;
1278  }
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 1242 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_().

1242  {
1244  auto status = m.setNull(index);
1245 #ifndef __CUDACC__
1246  if (status != FlatBufferManager::Status::Success) {
1247  throw std::runtime_error("setNull failed: " + ::toString(status));
1248  }
1249 #endif
1250  }
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 1237 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_().

1237  {
1238  return num_rows_;
1239  }

+ 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 1314 of file heavydbTypes.h.

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

1314  {
1316  return ::typeName(this) + "(" + m.toString() +
1317  ", num_rows=" + std::to_string(num_rows_) + ")";
1318  }
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: