Hyper API for C++ 0.0.20027
Hyper client library for C++ applications
Loading...
Searching...
No Matches
hyperapi::SqlType Class Referencefinal

A Hyper SQL type. More...

#include <SqlType.hpp>

Public Member Functions

 SqlType (TypeTag tag, uint32_t oid, hyper_type_modifier_t modifier=HYPER_UNUSED_MODIFIER) noexcept
 Constructor.
 
TypeTag getTag () const noexcept
 Returns the type tag.
 
uint32_t getInternalOid () const noexcept
 Returns the internal oid.
 
uint32_t getInternalTypeModifier () const noexcept
 Returns the internal type modifier.
 
uint32_t getPrecision () const noexcept
 Returns the maximum precision parameter of the type if the type supports it, HYPER_UNUSED_MODIFIER otherwise.
 
uint32_t getScale () const noexcept
 Returns the scale parameter of the type if the type supports it, HYPER_UNUSED_MODIFIER otherwise.
 
uint32_t getMaxLength () const noexcept
 Returns the maximum length parameter of the type if the type supports it, HYPER_UNUSED_MODIFIER otherwise.
 
std::string toString () const
 Returns a string representation for debugging.
 

Static Public Member Functions

static SqlType boolean () noexcept
 Returns the BOOL SQL type.
 
static SqlType bigInt () noexcept
 Returns the BIG INTEGER SQL type.
 
static SqlType smallInt () noexcept
 Returns the SMALL INTEGER SQL type.
 
static SqlType integer () noexcept
 Returns the INTEGER SQL type.
 
static SqlType numeric (uint16_t precision, uint16_t scale) noexcept
 Returns the NUMERIC SQL type.
 
static SqlType real () noexcept
 Returns the REAL SQL type.
 
static SqlType doublePrecision () noexcept
 Returns the DOUBLE PRECISION SQL type.
 
static SqlType oid () noexcept
 Returns the OID SQL type.
 
static SqlType bytes () noexcept
 Returns the BYTEA SQL type.
 
static SqlType text () noexcept
 Returns the TEXT SQL type.
 
static SqlType varchar (uint32_t maxLength) noexcept
 Returns the VARCHAR SQL type.
 
static SqlType character (uint32_t maxLength) noexcept
 Returns the CHARACTER SQL type.
 
static SqlType json () noexcept
 Returns the JSON SQL type.
 
static SqlType date () noexcept
 Returns the DATE SQL type.
 
static SqlType interval () noexcept
 Returns the INTERVAL SQL type.
 
static SqlType time () noexcept
 Returns the TIME SQL type.
 
static SqlType timestamp () noexcept
 Returns the TIMESTAMP SQL type.
 
static SqlType timestampTZ () noexcept
 Returns the TIMESTAMPTZ SQL type.
 
static SqlType geography () noexcept
 Returns the GEOGRAPHY SQL type.
 

Detailed Description

A Hyper SQL type.

Definition at line 44 of file SqlType.hpp.

Constructor & Destructor Documentation

◆ SqlType()

hyperapi::SqlType::SqlType ( TypeTag  tag,
uint32_t  oid,
hyper_type_modifier_t  modifier = HYPER_UNUSED_MODIFIER 
)
inlinenoexcept

Constructor.

Definition at line 47 of file SqlType.hpp.

Member Function Documentation

◆ bigInt()

static SqlType hyperapi::SqlType::bigInt ( )
inlinestaticnoexcept

Returns the BIG INTEGER SQL type.

Returns
The BIG INTEGER SQL type
Examples
create_hyper_file_from_csv.cpp, insert_data_into_multiple_tables.cpp, and insert_data_into_single_table.cpp.

Definition at line 101 of file SqlType.hpp.

◆ boolean()

static SqlType hyperapi::SqlType::boolean ( )
inlinestaticnoexcept

Returns the BOOL SQL type.

Returns
The BOOL SQL type

Definition at line 96 of file SqlType.hpp.

◆ bytes()

static SqlType hyperapi::SqlType::bytes ( )
inlinestaticnoexcept

Returns the BYTEA SQL type.

Returns
The BYTEA SQL type

Definition at line 138 of file SqlType.hpp.

◆ character()

static SqlType hyperapi::SqlType::character ( uint32_t  maxLength)
inlinestaticnoexcept

Returns the CHARACTER SQL type.

Parameters
maxLengthThe maximum length
Returns
The CHARACTER SQL type

Definition at line 155 of file SqlType.hpp.

◆ date()

static SqlType hyperapi::SqlType::date ( )
inlinestaticnoexcept

Returns the DATE SQL type.

Returns
The DATE SQL type
Examples
insert_data_into_multiple_tables.cpp.

Definition at line 165 of file SqlType.hpp.

◆ doublePrecision()

static SqlType hyperapi::SqlType::doublePrecision ( )
inlinestaticnoexcept

Returns the DOUBLE PRECISION SQL type.

Returns
The DOUBLE PRECISION SQL type
Examples
insert_data_into_multiple_tables.cpp.

Definition at line 128 of file SqlType.hpp.

◆ geography()

static SqlType hyperapi::SqlType::geography ( )
inlinestaticnoexcept

Returns the GEOGRAPHY SQL type.

Returns
The GEOGRAPHY SQL type
Examples
insert_spatial_data_to_a_hyper_file.cpp.

Definition at line 190 of file SqlType.hpp.

◆ getInternalOid()

uint32_t hyperapi::SqlType::getInternalOid ( ) const
inlinenoexcept

Returns the internal oid.

Note: This method is internal and may therefore be subject to change in future versions of the API.

Definition at line 61 of file SqlType.hpp.

◆ getInternalTypeModifier()

uint32_t hyperapi::SqlType::getInternalTypeModifier ( ) const
inlinenoexcept

Returns the internal type modifier.

Note: This method is internal and may therefore be subject to change in future versions of the API.

Definition at line 68 of file SqlType.hpp.

◆ getTag()

TypeTag hyperapi::SqlType::getTag ( ) const
inlinenoexcept

Returns the type tag.

Definition at line 54 of file SqlType.hpp.

◆ integer()

static SqlType hyperapi::SqlType::integer ( )
inlinestaticnoexcept

Returns the INTEGER SQL type.

Returns
The INTEGER SQL type
Examples
insert_data_with_expressions.cpp.

Definition at line 111 of file SqlType.hpp.

◆ interval()

static SqlType hyperapi::SqlType::interval ( )
inlinestaticnoexcept

Returns the INTERVAL SQL type.

Returns
The INTERVAL SQL type

Definition at line 170 of file SqlType.hpp.

◆ json()

static SqlType hyperapi::SqlType::json ( )
inlinestaticnoexcept

Returns the JSON SQL type.

Returns
The JSON SQL type

Definition at line 160 of file SqlType.hpp.

◆ numeric()

static SqlType hyperapi::SqlType::numeric ( uint16_t  precision,
uint16_t  scale 
)
inlinestaticnoexcept

Returns the NUMERIC SQL type.

Parameters
precisionThe precision
scaleThe scale
Returns
The NUMERIC SQL type

Definition at line 118 of file SqlType.hpp.

◆ oid()

static SqlType hyperapi::SqlType::oid ( )
inlinestaticnoexcept

Returns the OID SQL type.

Returns
The OID SQL type

Definition at line 133 of file SqlType.hpp.

◆ real()

static SqlType hyperapi::SqlType::real ( )
inlinestaticnoexcept

Returns the REAL SQL type.

Returns
The REAL SQL type

Definition at line 123 of file SqlType.hpp.

◆ smallInt()

static SqlType hyperapi::SqlType::smallInt ( )
inlinestaticnoexcept

Returns the SMALL INTEGER SQL type.

Returns
The SMALL INTEGER SQL type
Examples
insert_data_into_multiple_tables.cpp.

Definition at line 106 of file SqlType.hpp.

◆ text()

static SqlType hyperapi::SqlType::text ( )
inlinestaticnoexcept

◆ time()

static SqlType hyperapi::SqlType::time ( )
inlinestaticnoexcept

Returns the TIME SQL type.

Returns
The TIME SQL type

Definition at line 175 of file SqlType.hpp.

◆ timestamp()

static SqlType hyperapi::SqlType::timestamp ( )
inlinestaticnoexcept

Returns the TIMESTAMP SQL type.

Returns
The TIMESTAMP SQL type
Examples
insert_data_with_expressions.cpp.

Definition at line 180 of file SqlType.hpp.

◆ timestampTZ()

static SqlType hyperapi::SqlType::timestampTZ ( )
inlinestaticnoexcept

Returns the TIMESTAMPTZ SQL type.

Returns
The TIMESTAMPTZ SQL type

Definition at line 185 of file SqlType.hpp.

◆ toString()

std::string hyperapi::SqlType::toString ( ) const

Returns a string representation for debugging.

The returned string will be the SQL name of the type.

◆ varchar()

static SqlType hyperapi::SqlType::varchar ( uint32_t  maxLength)
inlinestaticnoexcept

Returns the VARCHAR SQL type.

Parameters
maxLengthThe maximum length
Returns
The VARCHAR SQL type

Definition at line 149 of file SqlType.hpp.


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