StormByte C++ Library: Database module 1.0.0
StormByte-Database is a StormByte library module for handling database connections
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations
StormByte::Database Namespace Reference

Contains classes and functions for database operations. More...

Classes

class  ColumnNotFound
 Exception when a column name is not present in a Row. More...
 
class  ConnectionError
 Exception thrown on connection failures. More...
 
class  Database
 Abstract base for database backends. More...
 
class  Exception
 Base class for Database exceptions. More...
 
class  ExecuteError
 Exception when query or statement execution fails. More...
 
class  NamedValue
 Value with an associated column name. More...
 
class  OutOfBounds
 Exception when a column index is out of range. More...
 
class  PreparedSTMT
 Abstract prepared statement (backend-specific subclasses). More...
 
class  QueryException
 Base for query-related errors. More...
 
class  Row
 Single result row: ordered NamedValues with lookup by column name. More...
 
class  Rows
 Ordered collection of result rows. More...
 
class  Transaction
 RAII wrapper for a database transaction. More...
 
class  UnknownSTMT
 Exception when a prepared statement name is not registered. More...
 
class  Value
 Type-erased SQL value (NULL, integers, double, text, blob, bool). More...
 
class  WrongValueType
 Exception thrown when a Value is accessed with the wrong type. More...
 

Typedefs

using ValuesVariant = std::variant< std::monostate, int, unsigned int, long int, unsigned long int, double, std::string, bool, std::vector< std::byte > >
 Variant holding supported column value types.
 
using ExpectedRows = Expected< Rows, QueryException >
 Query result: Rows or QueryException.
 

Enumerations

enum class  SslMode { Default , Disable , Prefer , Require }
 TLS policy for network backends (MariaDB, PostgreSQL). More...
 
enum class  IsolationLevel {
  Default , ReadUncommitted , ReadCommitted , RepeatableRead ,
  Serializable
}
 Transaction isolation level for BeginTransaction(). More...
 

Detailed Description

Contains classes and functions for database operations.

Database abstraction layer shared by all backends.

Typedef Documentation

◆ ValuesVariant

Variant holding supported column value types.

std::monostate represents SQL NULL.

Enumeration Type Documentation

◆ IsolationLevel

Transaction isolation level for BeginTransaction().

Mapping is backend-specific (e.g. SQLite maps several levels to DEFERRED/IMMEDIATE/EXCLUSIVE).

Enumerator
Default 

Backend default isolation.

ReadUncommitted 

Dirty reads allowed where supported.

ReadCommitted 

Only committed data is visible.

RepeatableRead 

Stable reads within the transaction.

Serializable 

Full serializability where supported.

◆ SslMode

enum class StormByte::Database::SslMode
strong

TLS policy for network backends (MariaDB, PostgreSQL).

SQLite ignores this setting. Default leaves the client library behaviour unchanged.

Enumerator
Default 

Client / driver default.

Disable 

Do not use TLS.

Prefer 

Prefer TLS when available, allow plaintext fallback if supported.

Require 

Require TLS; connection fails if TLS cannot be established.