Hyper API for C++  0.0.17231
Hyper client library for C++ applications
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...
 

Enumerations

enum  CreateMode { CreateMode::None = HYPER_DO_NOT_CREATE, CreateMode::Create = HYPER_CREATE, CreateMode::CreateIfNotExists = HYPER_CREATE_IF_NOT_EXISTS, CreateMode::CreateAndReplace = HYPER_CREATE_AND_REPLACE }
 Database creation behavior during connection establishing. More...
 
enum  Telemetry { Telemetry::SendUsageDataToTableau = HYPER_ENABLE_TELEMETRY, Telemetry::DoNotSendUsageDataToTableau = HYPER_DISABLE_TELEMETRY }
 The telemetry modes. More...
 
enum  TypeTag : int {
  Unsupported = HYPER_UNSUPPORTED, Bool = HYPER_BOOL, BigInt = HYPER_BIG_INT, SmallInt = HYPER_SMALL_INT,
  Int = HYPER_INT, Numeric = HYPER_NUMERIC, 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.
 
enum  Nullability : bool { Nullable = true, NotNullable = false }
 The nullability of a column. More...
 
enum  Persistence { Persistence::Permanent, Persistence::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. More...
 
std::string escapeName (string_view input)
 Escapes the given string for safe usage in SQL query or command strings as an identifier. More...
 
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 257 of file Result.hpp.

◆ hyperapi::IteratorEndTag

struct hyperapi::IteratorEndTag

A tag for an iterator-end constructor.

Definition at line 262 of file Result.hpp.

Enumeration Type Documentation

◆ CreateMode

enum 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 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 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.

Function Documentation

◆ 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_alloc
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_alloc
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.