StormByte-Database 2.0.0
C++26 database module of the StormByte suite
 
Loading...
Searching...
No Matches
StormByte::Database Namespace Reference

Database module of the StormByte suite. More...

Namespaces

namespace  MariaDB
 MariaDB backend of the Database module.
 
namespace  Postgres
 PostgreSQL backend of the Database module.
 
namespace  SQLite
 SQLite backend of the Database module.
 

Classes

class  ColumnNotFound
 Column name missing from a Row. More...
 
class  ConnectionError
 Connection failed. More...
 
class  Database
 Abstract backend. More...
 
class  Exception
 Base exception for the Database module. More...
 
class  ExecuteError
 Query or statement execution failed. More...
 
class  NamedValue
 Value plus column name. More...
 
struct  OperationMetrics
 Immutable view of cumulative metrics for one operation category. More...
 
class  OutOfBounds
 Column index out of range. More...
 
class  PreparedSTMT
 Abstract prepared statement. More...
 
class  QueryException
 Base for query errors. More...
 
class  Row
 One result row: ordered NamedValues with lookup by column name. More...
 
class  Rows
 Ordered collection of result rows. More...
 
class  Telemetry
 Thread-safe cumulative telemetry for one database connection. More...
 
class  Transaction
 RAII transaction. More...
 
class  TransactionError
 Beginning a database transaction failed. More...
 
class  UnknownSTMT
 Prepared statement name is not registered. More...
 
class  Value
 Type-erased SQL value (NULL, integers, double, text, blob, bool). More...
 
class  WrongValueType
 Value accessed as the wrong type. More...
 

Typedefs

using ValuesVariant = std::variant< std::monostate, int, unsigned int, long long int, unsigned long long int, double, StormByte::String::String, bool, StormByte::BinaryData >
 Column alternatives.
 
using ExpectedRows = Expected< Rows, QueryException >
 Query result: Rows or QueryException.
 

Enumerations

enum class  Operation : std::uint8_t {
  Connect , Disconnect , Query , SilentQuery ,
  PrepareStatement , PreparedStatement , BeginTransaction , CommitTransaction ,
  RollbackTransaction , Count
}
 Database operation categories measured by telemetry. More...
 
enum class  BackendEvent : std::uint8_t {
  Warning , Busy , Constraint , Io ,
  Connection , Serialization , Deadlock , LockTimeout ,
  Other , Count
}
 Shared error and warning categories for backend-specific telemetry. More...
 
enum class  SslMode { Default , Disable , Prefer , Require }
 TLS policy for MariaDB / PostgreSQL. More...
 
enum class  IsolationLevel {
  Default , ReadUncommitted , ReadCommitted , RepeatableRead ,
  Serializable
}
 Isolation for BeginTransaction(). More...
 

Detailed Description

Database module of the StormByte suite.

Typedef Documentation

◆ ExpectedRows

◆ ValuesVariant

Column alternatives.

std::monostate is SQL NULL.

Enumeration Type Documentation

◆ BackendEvent

enum class StormByte::Database::BackendEvent : std::uint8_t
strong

Shared error and warning categories for backend-specific telemetry.

Enumerator
Warning 

Non-fatal warning reported by a backend.

Busy 

Busy, locked, or lock-timeout condition.

Constraint 

Constraint violation.

Io 

Storage or transport I/O failure.

Connection 

Connection or protocol failure.

Serialization 

Transaction serialization conflict.

Deadlock 

Deadlock victim or equivalent conflict.

LockTimeout 

Lock wait timed out.

Other 

Backend failure without a narrower category.

Count 

Number of backend event categories.

◆ IsolationLevel

Isolation for BeginTransaction().

Mapping is backend-specific.

Enumerator
Default 

Backend default.

ReadUncommitted 

Dirty reads where supported.

ReadCommitted 

Committed data only.

RepeatableRead 

Stable reads in the transaction.

Serializable 

Full serializability where supported.

◆ Operation

enum class StormByte::Database::Operation : std::uint8_t
strong

Database operation categories measured by telemetry.

Enumerator
Connect 

Connection attempts.

Disconnect 

Disconnect calls.

Query 

Queries that return rows.

SilentQuery 

Queries that return only success or failure.

PrepareStatement 

Prepared-statement registration attempts.

PreparedStatement 

Prepared-statement execution attempts.

BeginTransaction 

Transaction begin attempts.

CommitTransaction 

Transaction commit attempts.

RollbackTransaction 

Explicit and automatic rollback attempts.

Count 

Number of operation categories.

◆ SslMode

enum class StormByte::Database::SslMode
strong

TLS policy for MariaDB / PostgreSQL.

SQLite ignores it.

Enumerator
Default 

Driver default.

Disable 

No TLS.

Prefer 

TLS if the server offers it.

Require 

Fail if TLS cannot be used.