Hyper API for C++ 0.0.20746
Hyper client library for C++ applications
Loading...
Searching...
No Matches
hyperapi Namespace Reference

The primary namespace of the Hyper API for C++. More...

Classes

class  bad_optional_access
 Surrogate for C++17 std::bad_optional_access More...
 
struct  ByteSpan
 An arbitrarily-sized binary value. More...
 
class  Catalog
 The catalog class gives access to the metadata of the attached databases of a connection. More...
 
class  Chunk
 A chunk of a result. More...
 
class  ChunkedResultIterator
 Iterates over a hyperapi::Result in hyperapi::Chunk. More...
 
class  ChunkIterator
 Iterates over a hyperapi::Chunk in rows (hyperapi::Row). More...
 
struct  Chunks
 A tag that makes a result iterable in chunks. More...
 
class  ColumnIterator
 Iterates over a hyperapi::Row in values (hyperapi::Value). More...
 
class  Connection
 Defines a Hyper connection. More...
 
class  ContextId
 A context id. More...
 
class  DatabaseName
 Represents an escaped SQL database name. More...
 
class  Date
 A date data value. More...
 
class  Endpoint
 Describes a network endpoint at which a Hyper server is accessible. More...
 
class  HyperException
 Defines an exception object that is thrown on failure by the functions in the Hyper API C++ library. More...
 
class  HyperProcess
 Defines a Hyper process. More...
 
struct  HyperServiceVersion
 A Hyper Service version number of the form 'major.minor'. More...
 
class  Inserter
 An inserter. More...
 
class  Interval
 An interval data value. More...
 
struct  IteratorBeginTag
 A tag for an iterator-begin constructor. More...
 
struct  IteratorEndTag
 A tag for an iterator-end constructor. More...
 
class  Name
 Represents an escaped SQL name. More...
 
class  Numeric
 A fixed-point numeric data value with scale fraction digits and precision digits overall. More...
 
class  OffsetTimestamp
 A timestamp data value with an offset to UTC. More...
 
class  optional
 Surrogate for C++17 std::optional More...
 
class  Result
 Base class for a result of a query. More...
 
class  ResultIterator
 Iterates over a hyperapi::Result in rows (hyperapi::Row). More...
 
class  ResultSchema
 A result schema. More...
 
class  Row
 A Row inside a chunk. More...
 
class  SchemaName
 Represents an escaped SQL schema name. More...
 
class  SqlType
 A Hyper SQL type. More...
 
class  string_view
 Describes an object that can refer to a constant, contiguous sequence of char-like objects. More...
 
class  TableDefinition
 A table definition. More...
 
class  TableName
 Represents an escaped SQL table name. More...
 
class  Time
 A time data value. More...
 
class  Timestamp
 A timestamp data value. More...
 
class  Value
 A value inside a row. More...
 

Typedefs

template<typename T >
using optional = std::optional< T >
 
using bad_optional_access = std::bad_optional_access
 

Enumerations

enum class  CreateMode { None = HYPER_DO_NOT_CREATE , Create = HYPER_CREATE , CreateIfNotExists = HYPER_CREATE_IF_NOT_EXISTS , CreateAndReplace = HYPER_CREATE_AND_REPLACE }
 Database creation behavior during connection establishing. More...
 
enum class  Telemetry { SendUsageDataToTableau = HYPER_ENABLE_TELEMETRY , DoNotSendUsageDataToTableau = HYPER_DISABLE_TELEMETRY }
 The telemetry modes. More...
 
enum class  TypeTag : int {
  Unsupported = HYPER_UNSUPPORTED , Bool = HYPER_BOOL , BigInt = HYPER_BIG_INT , SmallInt = HYPER_SMALL_INT ,
  Int = HYPER_INT , Numeric = HYPER_NUMERIC , Float = HYPER_FLOAT , Double = HYPER_DOUBLE ,
  Oid = HYPER_OID , Bytes = HYPER_BYTE_A , Text = HYPER_TEXT , Varchar = HYPER_VARCHAR ,
  Char = HYPER_CHAR , Json = HYPER_JSON , Date = HYPER_DATE , Interval = HYPER_INTERVAL ,
  Time = HYPER_TIME , Timestamp = HYPER_TIMESTAMP , TimestampTZ = HYPER_TIMESTAMP_TZ , Geography = HYPER_GEOGRAPHY
}
 A type tag. More...
 
enum  Nullability : bool { Nullable = true , NotNullable = false }
 The nullability of a column. More...
 
enum class  Persistence { Permanent , Temporary }
 Possible persistence levels for database objects. More...
 

Functions

std::ostream & operator<< (std::ostream &os, const DatabaseName &name)
 Stream output operator.
 
bool operator< (const DatabaseName &a, const DatabaseName &b) noexcept
 Smaller operator.
 
bool operator== (const DatabaseName &a, const DatabaseName &b) noexcept
 Equality operator.
 
bool operator> (const DatabaseName &a, const DatabaseName &b) noexcept
 Greater operator.
 
bool operator!= (const DatabaseName &a, const DatabaseName &b) noexcept
 Not equal operator.
 
bool operator<= (const DatabaseName &a, const DatabaseName &b) noexcept
 Smaller or equal operator.
 
bool operator>= (const DatabaseName &a, const DatabaseName &b) noexcept
 Greater or equal operator.
 
std::ostream & operator<< (std::ostream &os, const Name &name)
 Stream output operator.
 
bool operator< (const Name &a, const Name &b) noexcept
 Smaller operator.
 
bool operator== (const Name &a, const Name &b) noexcept
 Equality operator.
 
bool operator> (const Name &a, const Name &b) noexcept
 Greater operator.
 
bool operator!= (const Name &a, const Name &b) noexcept
 Not equal operator.
 
bool operator<= (const Name &a, const Name &b) noexcept
 Smaller or equal operator.
 
bool operator>= (const Name &a, const Name &b) noexcept
 Greater or equal operator.
 
bool operator== (const hyper_data128_t &a, const hyper_data128_t &b) noexcept
 Equality operator for hyper_data128_t.
 
bool operator> (const hyper_data128_t &a, const hyper_data128_t &b) noexcept
 Greater operator for hyper_data128_t.
 
ChunkIterator begin (const Chunk &chunk)
 Returns the begin-iterator for the rows of the given chunk.
 
ChunkIterator end (const Chunk &chunk) noexcept
 Returns the end-iterator for the rows of the given chunk.
 
ColumnIterator begin (const Row &row)
 Returns the begin-iterator for the values of the given row.
 
ColumnIterator end (const Row &row) noexcept
 Returns the end-iterator for the values of the given row.
 
ChunkedResultIterator begin (const Chunks &chunks)
 Returns the begin-iterator for the chunks of the given result.
 
ChunkedResultIterator end (const Chunks &chunks) noexcept
 Returns the end-iterator for the chunks of the given result.
 
ResultIterator begin (Result &result)
 Returns the begin-iterator for the rows of the given result.
 
ResultIterator end (Result &result) noexcept
 Returns the end-iterator for the rows of the given result.
 
std::ostream & operator<< (std::ostream &os, const SchemaName &name)
 Stream output operator.
 
bool operator< (const SchemaName &a, const SchemaName &b) noexcept
 Smaller operator.
 
bool operator== (const SchemaName &a, const SchemaName &b) noexcept
 Equality operator.
 
bool operator> (const SchemaName &a, const SchemaName &b) noexcept
 Greater operator.
 
bool operator!= (const SchemaName &a, const SchemaName &b) noexcept
 Not equal operator.
 
bool operator<= (const SchemaName &a, const SchemaName &b) noexcept
 Smaller or equal operator.
 
bool operator>= (const SchemaName &a, const SchemaName &b) noexcept
 Greater or equal operator.
 
std::string escapeStringLiteral (string_view input)
 Escapes the given string for safe usage in SQL query or command strings as a string literal.
 
std::string escapeName (string_view input)
 Escapes the given string for safe usage in SQL query or command strings as an identifier.
 
std::ostream & operator<< (std::ostream &os, Nullability nullability)
 Stream output operator for Nullability
 
std::ostream & operator<< (std::ostream &os, const TableName &name)
 Stream output operator.
 
bool operator< (const TableName &a, const TableName &b) noexcept
 Smaller operator.
 
bool operator== (const TableName &a, const TableName &b) noexcept
 Equality operator.
 
bool operator> (const TableName &a, const TableName &b) noexcept
 Greater operator.
 
bool operator!= (const TableName &a, const TableName &b) noexcept
 Not equal operator.
 
bool operator<= (const TableName &a, const TableName &b) noexcept
 Smaller or equal operator.
 
bool operator>= (const TableName &a, const TableName &b) noexcept
 Greater or equal operator.
 

Detailed Description

The primary namespace of the Hyper API for C++.


Class Documentation

◆ hyperapi::IteratorBeginTag

struct hyperapi::IteratorBeginTag

A tag for an iterator-begin constructor.

Definition at line 258 of file Result.hpp.

◆ hyperapi::IteratorEndTag

struct hyperapi::IteratorEndTag

A tag for an iterator-end constructor.

Definition at line 263 of file Result.hpp.

Typedef Documentation

◆ bad_optional_access

using hyperapi::bad_optional_access = typedef std::bad_optional_access

Definition at line 31 of file optional.hpp.

◆ optional

template<typename T >
using hyperapi::optional = typedef std::optional<T>

Definition at line 30 of file optional.hpp.

Enumeration Type Documentation

◆ CreateMode

enum class hyperapi::CreateMode
strong

Database creation behavior during connection establishing.

Enumerator
None 

Do not create the database. Method will fail if database doesn't exist.

Create 

Create the database. Method will fail if the database already exists.

CreateIfNotExists 

Create the database if it doesn't exist.

CreateAndReplace 

Create the database. If it already exists, drop the old one first.

Definition at line 26 of file Connection.hpp.

◆ Nullability

enum hyperapi::Nullability : bool

The nullability of a column.

Specifies whether the column can contain NULL values.

Enumerator
Nullable 

The column can contain NULL values.

NotNullable 

The column cannot contain NULL values.

Definition at line 23 of file TableDefinition.hpp.

◆ Persistence

enum class hyperapi::Persistence
strong

Possible persistence levels for database objects.

Enumerator
Permanent 

Permanent.

Temporary 

Temporary: Only available in the own session, not persisted.

Definition at line 34 of file TableDefinition.hpp.

◆ Telemetry

enum class hyperapi::Telemetry
strong

The telemetry modes.

Enumerator
SendUsageDataToTableau 

Telemetry data will be sent to tableau to help improve the Hyper API.

DoNotSendUsageDataToTableau 

No telemetry data will be sent to tableau.

Definition at line 22 of file HyperProcess.hpp.

◆ TypeTag

enum class hyperapi::TypeTag : int
strong

A type tag.

Definition at line 18 of file SqlType.hpp.

Function Documentation

◆ begin() [1/4]

ChunkIterator hyperapi::begin ( const Chunk chunk)
inline

Returns the begin-iterator for the rows of the given chunk.

Definition at line 313 of file Result.hpp.

◆ begin() [2/4]

ChunkedResultIterator hyperapi::begin ( const Chunks chunks)
inline

Returns the begin-iterator for the chunks of the given result.

Definition at line 536 of file Result.hpp.

◆ begin() [3/4]

ColumnIterator hyperapi::begin ( const Row row)
inline

Returns the begin-iterator for the values of the given row.

Definition at line 488 of file Result.hpp.

◆ begin() [4/4]

ResultIterator hyperapi::begin ( Result result)
inline

Returns the begin-iterator for the rows of the given result.

Definition at line 589 of file Result.hpp.

◆ end() [1/4]

ChunkIterator hyperapi::end ( const Chunk chunk)
inlinenoexcept

Returns the end-iterator for the rows of the given chunk.

Definition at line 318 of file Result.hpp.

◆ end() [2/4]

ChunkedResultIterator hyperapi::end ( const Chunks chunks)
inlinenoexcept

Returns the end-iterator for the chunks of the given result.

Definition at line 541 of file Result.hpp.

◆ end() [3/4]

ColumnIterator hyperapi::end ( const Row row)
inlinenoexcept

Returns the end-iterator for the values of the given row.

Definition at line 493 of file Result.hpp.

◆ end() [4/4]

ResultIterator hyperapi::end ( Result result)
inlinenoexcept

Returns the end-iterator for the rows of the given result.

Definition at line 594 of file Result.hpp.

◆ escapeName()

std::string hyperapi::escapeName ( string_view  input)

Escapes the given string for safe usage in SQL query or command strings as an identifier.

Parameters
inputThe identifier that should be escaped.
Exceptions
bad_allocin case of error
Returns
The escaped identifier.
Examples
delete_data_in_existing_hyper_file.cpp, insert_data_with_expressions.cpp, insert_spatial_data_to_a_hyper_file.cpp, and update_data_in_existing_hyper_file.cpp.

◆ escapeStringLiteral()

std::string hyperapi::escapeStringLiteral ( string_view  input)

Escapes the given string for safe usage in SQL query or command strings as a string literal.

Parameters
inputThe string literal that should be escaped.
Exceptions
bad_allocin case of error
Returns
The escaped identifier.
Examples
create_hyper_file_from_csv.cpp, delete_data_in_existing_hyper_file.cpp, insert_data_with_expressions.cpp, and update_data_in_existing_hyper_file.cpp.

◆ operator!=() [1/4]

bool hyperapi::operator!= ( const DatabaseName a,
const DatabaseName b 
)
inlinenoexcept

Not equal operator.

Definition at line 57 of file DatabaseName.hpp.

◆ operator!=() [2/4]

bool hyperapi::operator!= ( const Name a,
const Name b 
)
inlinenoexcept

Not equal operator.

Definition at line 65 of file Name.hpp.

◆ operator!=() [3/4]

bool hyperapi::operator!= ( const SchemaName a,
const SchemaName b 
)
inlinenoexcept

Not equal operator.

Definition at line 63 of file SchemaName.hpp.

◆ operator!=() [4/4]

bool hyperapi::operator!= ( const TableName a,
const TableName b 
)
inlinenoexcept

Not equal operator.

Definition at line 67 of file TableName.hpp.

◆ operator<() [1/2]

bool hyperapi::operator< ( const DatabaseName a,
const DatabaseName b 
)
inlinenoexcept

Smaller operator.

Definition at line 51 of file DatabaseName.hpp.

◆ operator<() [2/2]

bool hyperapi::operator< ( const Name a,
const Name b 
)
inlinenoexcept

Smaller operator.

Definition at line 59 of file Name.hpp.

◆ operator<<() [1/4]

std::ostream & hyperapi::operator<< ( std::ostream &  os,
const DatabaseName name 
)
inline

Stream output operator.

Definition at line 48 of file DatabaseName.hpp.

◆ operator<<() [2/4]

std::ostream & hyperapi::operator<< ( std::ostream &  os,
const Name name 
)
inline

Stream output operator.

Definition at line 56 of file Name.hpp.

◆ operator<<() [3/4]

std::ostream & hyperapi::operator<< ( std::ostream &  os,
const SchemaName name 
)
inline

Stream output operator.

Definition at line 54 of file SchemaName.hpp.

◆ operator<<() [4/4]

std::ostream & hyperapi::operator<< ( std::ostream &  os,
const TableName name 
)
inline

Stream output operator.

Definition at line 58 of file TableName.hpp.

◆ operator<=() [1/4]

bool hyperapi::operator<= ( const DatabaseName a,
const DatabaseName b 
)
inlinenoexcept

Smaller or equal operator.

Definition at line 59 of file DatabaseName.hpp.

◆ operator<=() [2/4]

bool hyperapi::operator<= ( const Name a,
const Name b 
)
inlinenoexcept

Smaller or equal operator.

Definition at line 67 of file Name.hpp.

◆ operator<=() [3/4]

bool hyperapi::operator<= ( const SchemaName a,
const SchemaName b 
)
inlinenoexcept

Smaller or equal operator.

Definition at line 65 of file SchemaName.hpp.

◆ operator<=() [4/4]

bool hyperapi::operator<= ( const TableName a,
const TableName b 
)
inlinenoexcept

Smaller or equal operator.

Definition at line 69 of file TableName.hpp.

◆ operator==() [1/5]

bool hyperapi::operator== ( const DatabaseName a,
const DatabaseName b 
)
inlinenoexcept

Equality operator.

Definition at line 53 of file DatabaseName.hpp.

◆ operator==() [2/5]

bool hyperapi::operator== ( const hyper_data128_t &  a,
const hyper_data128_t &  b 
)
inlinenoexcept

Equality operator for hyper_data128_t.

Definition at line 35 of file Numeric.hpp.

◆ operator==() [3/5]

bool hyperapi::operator== ( const Name a,
const Name b 
)
inlinenoexcept

Equality operator.

Definition at line 61 of file Name.hpp.

◆ operator==() [4/5]

bool hyperapi::operator== ( const SchemaName a,
const SchemaName b 
)
inlinenoexcept

Equality operator.

Definition at line 59 of file SchemaName.hpp.

◆ operator==() [5/5]

bool hyperapi::operator== ( const TableName a,
const TableName b 
)
inlinenoexcept

Equality operator.

Definition at line 63 of file TableName.hpp.

◆ operator>() [1/5]

bool hyperapi::operator> ( const DatabaseName a,
const DatabaseName b 
)
inlinenoexcept

Greater operator.

Definition at line 55 of file DatabaseName.hpp.

◆ operator>() [2/5]

bool hyperapi::operator> ( const hyper_data128_t &  a,
const hyper_data128_t &  b 
)
inlinenoexcept

Greater operator for hyper_data128_t.

Definition at line 37 of file Numeric.hpp.

◆ operator>() [3/5]

bool hyperapi::operator> ( const Name a,
const Name b 
)
inlinenoexcept

Greater operator.

Definition at line 63 of file Name.hpp.

◆ operator>() [4/5]

bool hyperapi::operator> ( const SchemaName a,
const SchemaName b 
)
inlinenoexcept

Greater operator.

Definition at line 61 of file SchemaName.hpp.

◆ operator>() [5/5]

bool hyperapi::operator> ( const TableName a,
const TableName b 
)
inlinenoexcept

Greater operator.

Definition at line 65 of file TableName.hpp.

◆ operator>=() [1/4]

bool hyperapi::operator>= ( const DatabaseName a,
const DatabaseName b 
)
inlinenoexcept

Greater or equal operator.

Definition at line 61 of file DatabaseName.hpp.

◆ operator>=() [2/4]

bool hyperapi::operator>= ( const Name a,
const Name b 
)
inlinenoexcept

Greater or equal operator.

Definition at line 69 of file Name.hpp.

◆ operator>=() [3/4]

bool hyperapi::operator>= ( const SchemaName a,
const SchemaName b 
)
inlinenoexcept

Greater or equal operator.

Definition at line 67 of file SchemaName.hpp.

◆ operator>=() [4/4]

bool hyperapi::operator>= ( const TableName a,
const TableName b 
)
inlinenoexcept

Greater or equal operator.

Definition at line 71 of file TableName.hpp.