Skip to main content

#include <gpudb/Type.hpp>

Public Types

enum  ColumnType
  BYTES = ::avro::AVRO_BYTES ,
  DOUBLE = ::avro::AVRO_DOUBLE ,
  FLOAT = ::avro::AVRO_FLOAT ,
  INT = ::avro::AVRO_INT ,
  LONG = ::avro::AVRO_LONG ,
  STRING = ::avro::AVRO_STRING
 

Public Member Functions

 Column (const std::string &name, const ColumnType type, const std::string &property1="", const std::string &property2="", const std::string &property3="")
 
 Column (const std::string &name, const ColumnType type, const std::vector< std::string > &properties)
 
const std::string & getName () const
 
ColumnType getType () const
 
std::string getTypeName () const
 
bool isNullable () const
 
bool isArray () const
 
std::string getArrayType () const
 
const std::vector< std::string > & getProperties () const
 
bool hasProperty (std::string property) const
 
bool isVector () const
 
int getVectorDimensions () const
 
bool isColumnCompatible (const Column &other, bool check_query_compatibility=false) const
 Check if the given column is compatible with this column (checks name, primitive types and type-related properties, including nullability).
 

Friends

bool operator== (const Column &lhs, const Column &rhs)
 
std::ostream & operator<< (std::ostream &os, const Column &column)
 
std::ostream & operator<< (std::ostream &os, Column &column)
 

Detailed Description

Definition at line 22 of file Type.hpp.

Member Enumeration Documentation

◆ ColumnType

Enumerator
BYTES 
DOUBLE 
FLOAT 
INT 
LONG 
STRING 

Definition at line 25 of file Type.hpp.

Constructor & Destructor Documentation

◆ Column() [1/2]

gpudb::Type::Column::Column (const std::string &name,
const ColumnTypetype,
const std::string &property1 = "",
const std::string &property2 = "",
const std::string &property3 = "" )

◆ Column() [2/2]

gpudb::Type::Column::Column (const std::string &name,
const ColumnTypetype,
const std::vector< std::string > &properties )

Member Function Documentation

◆ getArrayType()

std::string gpudb::Type::Column::getArrayType () const

◆ getName()

const std::string & gpudb::Type::Column::getName () const

◆ getProperties()

const std::vector< std::string > & gpudb::Type::Column::getProperties () const

◆ getType()

ColumnType gpudb::Type::Column::getType () const

◆ getTypeName()

std::string gpudb::Type::Column::getTypeName () const

◆ getVectorDimensions()

int gpudb::Type::Column::getVectorDimensions () const

◆ hasProperty()

bool gpudb::Type::Column::hasProperty (std::stringproperty) const

◆ isArray()

bool gpudb::Type::Column::isArray () const

◆ isColumnCompatible()

bool gpudb::Type::Column::isColumnCompatible (const Column &other,
boolcheck_query_compatibility = false ) const

Check if the given column is compatible with this column (checks name, primitive types and type-related properties, including nullability).

By default, does not check query compatibility (e.g. ‘data’, ‘disk_optimized’, ‘store_only’, and ‘text_search’.), but will if specified.

◆ isNullable()

bool gpudb::Type::Column::isNullable () const

◆ isVector()

bool gpudb::Type::Column::isVector () const

◆ operator<< [1/2]

std::ostream & operator<< (std::ostream &os,
Column &column )
friend

◆ operator<< [2/2]

std::ostream & operator<< (std::ostream &os,
const Column &column )
friend

◆ operator==

bool operator== (const Column &lhs,
const Column &rhs )
friend

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