columnstore_data_convert_status_t Type

type columnstore_data_convert_status_t

The status value used in ColumnStoreBulkInsert::setColumn() and ColumnStoreBulkInsert::setNull() to signify the status of any data conversion that occurred during setting.

type CONVERT_STATUS_NONE

There was no problems during the conversion or no conversion.

type CONVERT_STATUS_SATURATED

The value was saturated during the conversion, the maximum/minimum was used instead.

type CONVERT_STATUS_INVALID

The value was invalid during the conversion, 0 or empty string was used instead.

type CONVERT_STATUS_TRUNCATED

The value was truncated.

columnstore_data_types_t Type

type columnstore_data_types_t

The data type as returned by ColumnStoreSystemCatalogColumn::getType().

type DATA_TYPE_BIT

BIT data type

type DATA_TYPE_TINYINT

TINYINT data type

type DATA_TYPE_CHAR

CHAR data type

type DATA_TYPE_SMALLINT

SMALLINT data type

type DATA_TYPE_DECIMAL

DECIMAL data type

type DATA_TYPE_MEDINT

MEDIUMINT data type

type DATA_TYPE_INT

INT data type

type DATA_TYPE_FLOAT

FLOAT data type

type DATA_TYPE_DATE

DATE data type

type DATA_TYPE_BIGINT

BIGINT data type

type DATA_TYPE_DOUBLE

DOUBLE data type

type DATA_TYPE_DATETIME

DATETIME data type

type DATA_TYPE_VARCHAR

VARCHAR data type

type DATA_TYPE_VARBINARY

VARBINARY data type

type DATA_TYPE_CLOB

Unused

type DATA_TYPE_BLOB

BLOB data type

type DATA_TYPE_UTINYINT

UNSIGNED TINYINT data type

type DATA_TYPE_USMALLINT

UNSIGNED SMALLINT data type

type DATA_TYPE_UDECIMAL

UNSIGNED DECIMAL data type

type DATA_TYPE_UMEDINT

UNSIGNED MEDIUMINT data type

type DATA_TYPE_UINT

UNSIGNED INT data type

type DATA_TYPE_UFLOAT

UNSIGNED FLOAT data type

type DATA_TYPE_UBIGINT

UNSIGNED BIGINT data type

type DATA_TYPE_UDOUBLE

UNSIGNED DOUBLE data type

type DATA_TYPE_TEXT

TEXT data type

columnstore_lock_types_t Type

These are constants for the table locks as returned by TableLockInfo::state()
type LOCK_TYPE_CLEANUP
type LOCK_TYPE_LOADING

TableLockInfo Struct

type TalbeLockInfo

A struct containing table lock information

type TableLockInfo::id

UNSIGNED int64 lock id

type TableLockInfo::ownerName

std::string name of the owner of the table lock

type TableLockInfo::ownerPID

UNSINGNED int32 process id of the lock owner

type TableLockInfo::ownerSessionID

UNSIGNED int32 session id of the lock owner

type TableLockInfo::ownerTxnID

UNSIGNED int32 transaction id of the lock owner

type TableLockInfo::state

columnstore_lock_types_t state of the lock

type TableLockInfo::creationTime

time_t creation time of the lock

type TableLockInfo::dbrootList

std::vector<uint32_t> list of PMs involved in this lock

ColumnStoreDateTime Class

class ColumnStoreDateTime

A class which is used to contain a date/time used to set DATE or DATETIME columns using ColumnStoreBulkInsert::setColumn()

ColumnStoreDateTime()

ColumnStoreDateTime::ColumnStoreDateTime()

Sets the date/time to 0000-00-00 00:00:00.

ColumnStoreDateTime::ColumnStoreDateTime(tm &time)

Sets the date/time the value of the tm struct.

Parameters:time – The date/time to set
Raises ColumnStoreDataError:
 When an invalid date or time is supplied
ColumnStoreDateTime::ColumnStoreDateTime(const std::string &dateTime, const std::string &format)

Sets the date/time based on a given string and format.

Parameters:
  • dateTime – A string containing the date/time to set
  • format – The format specifier for the date/time string. This uses the strptime format.
Raises ColumnStoreDataError:
 

When an invalid date or time is supplied

ColumnStoreDateTime::ColumnStoreDateTime(uint32_t year, uint32_t month, uint32_t day, uint32_t hour, uint32_t minute, uint32_t second, uint32_t microsecond)

Sets the date/time based on a given set of intergers

Note

Microseconds are for future usage, they are not currently supported in ColumnStore.

Parameters:
  • year – The year
  • month – The month of year
  • day – The day of month
  • hour – The hour
  • minute – The minute
  • second – The second
  • microsecond – The microseconds
Raises ColumnStoreDataError:
 

When an invalid date or time is supplied

set()

bool ColumnStoreDateTime::set(tm &time)

Sets the date/time using the value of the tm struct.

Parameters:time – The date/time to set
Returns:true if the date/time is valid, false if it is not
bool ColumnStoreDateTime::set(const std::string &dateTime, const std::string &format)

Sets the date/time based on a given string and format.

Parameters:
  • dateTime – A string containing the date/time to set
  • format

    The format specifier for the date/time string. This uses the strptime format.

Returns:

true if the date/time is valid, false if it is not

ColumnStoreDecimal Class

class ColumnStoreDecimal

A class which is used to contain a non-lossy decimal format used to set DECIMAL columns using ColumnStoreBulkInsert::setColumn().

ColumnStoreDecimal()

ColumnStoreDecimal::ColumnStoreDecimal()

Sets the decimal to 0.

ColumnStoreDecimal::ColumnStoreDecimal(int64_t value)

Sets the decimal to an supplied integer value.

Parameters:value – The value to set
Raises ColumnStoreDataError:
 When an invalid value is supplied
ColumnStoreDecimal::ColumnStoreDecimal(const std::string &value)

Sets the decimal to the contents of a supplied std::string value (such as "3.14159").

Parameters:value – The value to set
Raises ColumnStoreDataError:
 When an invalid value is supplied
ColumnStoreDecimal::ColumnStoreDecimal(double value)

Sets the decimal to the contents of a supplied double value.

Note

The internally this uses the std::string method so the performance may be lower than expected.

Parameters:value – The value to set
Raises ColumnStoreDataError:
 When an invalid value is supplied
ColumnStoreDecimal::ColumnStoreDecimal(int64_t number, uint8_t scale)

Sets the decimal to a given number and scale. For example for the value 3.14159 you would set the number to 314159 and the scale to 5.

Parameters:
  • number – The number to set
  • scale – The scale for the number
Raises ColumnStoreDataError:
 

When an invalid number/scale is supplied

set()

bool ColumnStoreDecimal::set(int64_t value)

Sets the decimal to an supplied integer value.

Parameters:value – The value to set
Returns:Always returns true
bool ColumnStoreDecimal::set(const std::string &value)

Sets the decimal to the contents of a supplied std::string value (such as "3.14159").

Parameters:value – The value to set
Returns:true if the conversion was successful or false if it failed
bool ColumnStoreDecimal::set(double value)

Sets the decimal to the contents of a supplied std::string value (such as "3.14159").

Note

The internally this uses the std::string method so the performance may be lower than expected.

Parameters:value – The value to set
Returns:true if the conversion was successful or false if it failed
bool ColumnStoreDecimal::set(int64_t number, uint8_t scale)

Sets the decimal to a given number and scale. For example for the value 3.14159 you would set the number to 314159 and the scale to 5.

Parameters:
  • number – The number to set
  • scale – The scale for the number
Returns:

true if the conversion was successful or false if it failed

ColumnStoreTime Class

class ColumnStoreTime

A class which is used to contain a date/time used to set TIME columns using ColumnStoreBulkInsert::setColumn()

ColumnStoreTime()

ColumnStoreTime::ColumnStoreTime()

Sets the date/time to 00:00:00.

ColumnStoreTime::ColumnStoreTime(tm &time)

Sets the time value of the tm struct.

Parameters:time – The time to set
Raises ColumnStoreDataError:
 When an invalid date or time is supplied
ColumnStoreTime::ColumnStoreTime(const std::string &time, const std::string &format)

Sets the time based on a given string and format.

Parameters:
  • time – A string containing the time to set
  • format

    The format specifier for the time string. This uses the strptime format.

Raises ColumnStoreDataError:
 

When an invalid date or time is supplied

ColumnStoreTime::ColumnStoreTime(int32_t hour, uint32_t minute, uint32_t second, uint32_t microsecond = 0, bool is_negative = false)

Sets the time based on a given set of intergers

Note

If the the time is a negative and the hours are zero then is_negative should be set. Otherwise the driver will automatically set this for you.

Parameters:
  • hour – The hour
  • minute – The minute
  • second – The second
  • microsecond – The microseconds
  • is_negative – A zero hour time that is negative
Raises ColumnStoreDataError:
 

When an invalid date or time is supplied

set()

bool ColumnStoreTime::set(tm &time)

Sets the time using the value of the tm struct.

Parameters:time – The time to set
Returns:true if the time is valid, false if it is not
bool ColumnStoreTime::set(const std::string &time, const std::string &format)

Sets the time based on a given string and format.

Parameters:
  • time – A string containing the time to set
  • format

    The format specifier for the time string. This uses the strptime format.

Returns:

true if the time is valid, false if it is not

ColumnStoreSystemCatalog Class

class ColumnStoreSystemCatalog

A class which contains the ColumnStore system catalog of tables and columns. It should be instantiated using ColumnStoreDriver::getSystemCatalog().

Note

The system catalog stores schema, table and column names as lower case and therefore the functions only return lower case names. Since version 1.1.4 we make case insensitive matches.

getTable()

ColumnStoreSystemCatalogTable &ColumnStoreSystemCatalog::getTable(const std::string &schemaName, const std::string &tableName)

Gets the table information for a specific table.

Parameters:
  • schemaName – The schema the table is in
  • tableName – The name of the table
Returns:

The table information

Raises ColumnStoreNotFound:
 

If the table is not found in the system catalog

ColumnStoreSystemCatalogTable Class

class ColumnStoreSystemCatalogTable

A class which contains the system catalog information for a specific table. It should be instantiated using ColumnStoreSystemCatalog::getTable().

Note

The system catalog stores schema, table and column names as lower case and therefore the functions only return lower case names. Since version 1.1.4 we make case insensitive matches.

getSchemaName()

const std::string &ColumnStoreSystemCatalogTable::getSchemaName()

Retrieves the database schema name for the table

Returns:The schema name

getTableName()

const std::string &ColumnStoreSystemCatalogTable::getTableName()

Retrieves the table name for the table

Returns:The table name

getOID()

uint32_t ColumnStoreSystemCatalogTable::getOID()

Retrieves the ColumnStore object ID for the table.

Returns:The object ID for the table

getColumnCount()

uint16_t ColumnStoreSystemCatalogTable::getColumnCount()

Retrieves the number of columns in the table

Returns:The number of columns in the table

getColumn()

ColumnStoreSystemCatalogColumn &ColumnStoreSystemCatalogTable::getColumn(const std::string &columnName)

Retrieves the column information for a specified column by name

Parameters:columnName – The name of the column to retrieve
Returns:The column information
Raises ColumnStoreNotFound:
 If the column is not found
ColumnStoreSystemCatalogColumn &ColumnStoreSystemCatalogTable::getColumn(uint16_t columnNumber)

Retrieves the column information for a specified column by number starting at zero

Parameters:columnNumber – The number of the column to retrieve starting at 0
Returns:The column information
Raises ColumnStoreNotFound:
 If the column is not found

ColumnStoreSystemCatalogColumn Class

class ColumnStoreSystemCatalogColumn

A class containing information about a specific column in the system catalog. Should be instantiated using ColumnStoreSystemCatalogTable::getColumn().

Note

The system catalog stores schema, table and column names as lower case and therefore the functions only return lower case names. Since version 1.1.4 we make case insensitive matches.

getOID()

uint32_t ColumnStoreSystemCatalogColumn::getOID()

Retrieves the ColumnStore object ID for the column

Returns:The column object ID

getColumnName()

const std::string &ColumnStoreSystemCatalogColumn::getColumnName()

Retrieves the name of the column

Returns:The column name

getDictionaryOID()

uint32_t ColumnStoreSystemCatalogColumn::getDictionaryOID()

Retrieves the dictionary object ID for the column (or 0 if there is no dictionary)

Returns:The dictionary object ID or 0 for no dictionary

getType()

columnstore_data_types_t ColumnStoreSystemCatalogColumn::getType()

Retrieves the data type for the column

Returns:The data type for the column

getWidth()

uint32_t ColumnStoreSystemCatalogColumn::getWidth()

Retrieves the width in bytes for the column

Returns:The width in bytes

getPosition()

uint32_t ColumnStoreSystemCatalogColumn::getPosition()

Retrieves the column’s position in the table. The sequence of columns in the table is sorted on object ID, columns may be out-of-order if an ALTER TABLE has inserted one in the middle of the table.

Returns:The column’s position in the table

getDefaultValue()

const std::string &ColumnStoreSystemCatalogColumn::getDefaultValue()

Retrieves the default value for the column in text. The value is empty for no default.

Returns:The column’s default value

isAutoincrement()

bool ColumnStoreSystemCatalogColumn::isAutoincrement()

Retrieves whether or not this column is an autoincrement column.

Returns:true if this column is autoincrement, false if it isn’t

getPrecision()

uint32_t ColumnStoreSystemCatalogColumn::getPrecision()

Retrieves the decimal precision for the column.

Returns:The decimal precision

getScale()

uint32_t ColumnStoreSystemCatalogColumn::getScale()

Retrieves the decimal scale for the column.

Returns:The decimal scale

isNullable()

bool ColumnStoreSystemCatalogColumn::isNullable()

Retrieves whether or not the column can be set to NULL

Returns:true if the column can be NULL or false if it can not

compressionType()

uint8_t ColumnStoreSystemCatalogColumn::compressionType()

Retrieves the compression type for the column. 0 means no compression and 2 means Snappy compression

Returns:The compression type for the column