userver: storages::odbc Namespace Reference
Loading...
Searching...
No Matches
storages::odbc Namespace Reference

Detailed Description

Top namespace for uODBC driver.

For more information see ODBC Driver

Classes

class  BulkExecutionError
class  BulkParameterStore
 Owning, ordered rows of parameters for ODBC bulk DML. More...
class  BulkResult
 Outcome snapshot of an ODBC bulk execution. More...
class  Bytes
 Owning byte sequence for SQL BINARY, VARBINARY and LONGVARBINARY. More...
class  Cluster
 ODBC cluster client: queries and transactions against pooled DSNs. More...
struct  CommandControl
class  ConnectionError
class  Cursor
 A move-only incremental ODBC result cursor. More...
class  Date
 Timezone-independent Gregorian calendar date in the portable 1..9999 range. More...
class  Decimal
struct  DiagnosticRecord
 A single diagnostic record reported by the ODBC driver manager or driver. More...
class  Error
struct  ExecutionResult
 Metadata for an execution of a statement that doesn't expect a result set (INSERT, UPDATE, DELETE). More...
class  Field
 Single cell in an ODBC result set row. More...
class  FieldIndexOutOfBounds
class  LogicError
class  OperationInterrupted
class  ParameterStore
 Owning, ordered list of dynamically assembled ODBC parameters. More...
class  PoolError
 Thrown when an ODBC pool cannot provide a connection for a non-timeout reason. More...
class  ResultSet
 Result set for ODBC query execution. More...
class  ResultSetError
class  Row
 Row view over an ODBC result set. More...
class  RowIndexOutOfBounds
class  RuntimeError
class  StatementError
class  Time
class  Timestamp
class  Transaction
 RAII transaction wrapper, auto-ROLLBACKs on destruction if no prior Commit/Rollback call was made. More...
class  TransactionException
struct  TransactionOptions

Typedefs

using ClusterHostTypeFlags = ::utils::Flags<ClusterHostType>
using OptionalCommandControl = std::optional<CommandControl>
using CommandControlByMethodMap = utils::impl::TransparentMap<std::string, CommandControl>
 Command controls keyed by an HTTP method.
using CommandControlByHandlerMap = utils::impl::TransparentMap<std::string, CommandControlByMethodMap>
 Command controls keyed first by handler path, then by HTTP method.
using CommandControlByQueryMap = utils::impl::TransparentMap<std::string, CommandControl>
 Command controls keyed by storages::odbc::Query name.
using ClusterPtr = std::shared_ptr<Cluster>
 Smart pointer to the storages::odbc::Cluster.
using Query = ::storages::Query

Enumerations

enum class  BulkRowStatus {
  kSuccess ,
  kSuccessWithInfo ,
  kError ,
  kUnused ,
  kDiagnosticsUnavailable ,
  kUnknown
}
 Status of one input row in an ODBC bulk execution. More...
enum class  ClusterHostType : uint8_t {
  Cluster roles ,
  kNone = 0x00 ,
  kMaster = 0x01 ,
  kSlave = 0x02
}
enum class  IsolationLevel : std::uint8_t {
  kReadUncommitted ,
  kReadCommitted ,
  kRepeatableRead ,
  kSerializable
}
 Portable ODBC transaction isolation levels. More...
enum class  AccessMode : std::uint8_t {
  kReadOnly ,
  kReadWrite
}

Functions

std::string ToString (ClusterHostType)
std::string ToString (ClusterHostTypeFlags)
logging::LogHelperoperator<< (logging::LogHelper &, ClusterHostType)
logging::LogHelperoperator<< (logging::LogHelper &, ClusterHostTypeFlags)
constexpr bool operator== (const TransactionOptions &lhs, const TransactionOptions &rhs) noexcept

Variables

constexpr std::size_t kDefaultBulkRows = 1000
constexpr ClusterHostTypeFlags kClusterHostRolesMask {ClusterHostType::kMaster, ClusterHostType::kSlave}

Typedef Documentation

◆ ClusterHostTypeFlags

using storages::odbc::ClusterHostTypeFlags = ::utils::Flags<ClusterHostType>

Definition at line 32 of file cluster_types.hpp.

◆ ClusterPtr

using storages::odbc::ClusterPtr = std::shared_ptr<Cluster>

Smart pointer to the storages::odbc::Cluster.

Definition at line 20 of file odbc_fwd.hpp.

◆ CommandControlByHandlerMap

using storages::odbc::CommandControlByHandlerMap = utils::impl::TransparentMap<std::string, CommandControlByMethodMap>

Command controls keyed first by handler path, then by HTTP method.

Definition at line 36 of file command_control.hpp.

◆ CommandControlByMethodMap

using storages::odbc::CommandControlByMethodMap = utils::impl::TransparentMap<std::string, CommandControl>

Command controls keyed by an HTTP method.

Definition at line 33 of file command_control.hpp.

◆ CommandControlByQueryMap

using storages::odbc::CommandControlByQueryMap = utils::impl::TransparentMap<std::string, CommandControl>

Command controls keyed by storages::odbc::Query name.

Definition at line 39 of file command_control.hpp.

◆ OptionalCommandControl

using storages::odbc::OptionalCommandControl = std::optional<CommandControl>

Definition at line 30 of file command_control.hpp.

◆ Query

using storages::odbc::Query = ::storages::Query

Definition at line 12 of file query.hpp.

Enumeration Type Documentation

◆ AccessMode

enum class storages::odbc::AccessMode : std::uint8_t
strong

ODBC transaction access-mode hint.

Warning
kReadOnly requests SQL_MODE_READ_ONLY from the ODBC driver, but ODBC defines this as an intent/optimization hint. It does not guarantee that the database rejects write statements.

Definition at line 26 of file transaction_options.hpp.

◆ BulkRowStatus

enum class storages::odbc::BulkRowStatus
strong

Status of one input row in an ODBC bulk execution.

Enumerator
kSuccess 

Driver confirmed successful execution without diagnostics.

kSuccessWithInfo 

Driver confirmed success and reported warning-class diagnostics.

kError 

Driver reported that this row failed.

kUnused 

Driver reported that this row was not used.

kDiagnosticsUnavailable 

The row was processed, but row-specific diagnostics are unavailable.

kUnknown 

The driver did not provide a trustworthy per-row status.

Definition at line 21 of file bulk.hpp.

◆ ClusterHostType

enum class storages::odbc::ClusterHostType : uint8_t
strong
Enumerator
kMaster 

Connect to cluster's master. Only this connection may be used for read-write transactions.

kSlave 

Connect to one of cluster's slaves. Can be used only for read only transactions.

Definition at line 18 of file cluster_types.hpp.

◆ IsolationLevel

enum class storages::odbc::IsolationLevel : std::uint8_t
strong

Portable ODBC transaction isolation levels.

Definition at line 14 of file transaction_options.hpp.

Function Documentation

◆ operator==()

bool storages::odbc::operator== ( const TransactionOptions & lhs,
const TransactionOptions & rhs )
constexprnoexcept

Definition at line 57 of file transaction_options.hpp.

Variable Documentation

◆ kClusterHostRolesMask

ClusterHostTypeFlags storages::odbc::kClusterHostRolesMask {ClusterHostType::kMaster, ClusterHostType::kSlave}
constexpr

Definition at line 34 of file cluster_types.hpp.

◆ kDefaultBulkRows

std::size_t storages::odbc::kDefaultBulkRows = 1000
inlineconstexpr

Definition at line 18 of file bulk.hpp.