VSQLite++ 0.3
Loading...
Searching...
No Matches
sqlite Namespace Reference

Namespaces

namespace  v2
namespace  detail
namespace  json
namespace  fts

Classes

struct  backup
 backup is a class for representing SQLite backup operations An object of this class is not copyable More...
struct  named_parameter
struct  null_type
 null_type is an empty type used to represent NULL values More...
struct  command
 command is the base class of all sql command classes An object of this class is not copyable More...
struct  connection
 connection is used to open, close, attach and detach a database. Further it has to be passed to all classes since it represents the connection to the database and contains the internal needed handle, so you can see a connection object as handle to the database An object of this class is not copyable More...
class  connection_pool
 Thread-safe pool for leasing reusable SQLite connections. More...
struct  database_exception
 Generic runtime failure raised for most SQLite errors. More...
struct  database_exception_code
 Exception that carries the original SQLite error code and optional SQL snippet. More...
struct  buffer_too_small_exception
 Raised when a caller-provided buffer is too small to hold a blob/text payload. More...
struct  database_misuse_exception
 Used for programming errors such as double-closing or using invalidated resources. More...
struct  database_misuse_exception_code
 Logic-error flavour that also exposes the SQLite status code and SQL string. More...
struct  database_system_error
 Wraps system-level failures (e.g., file I/O) that bubble up from SQLite APIs. More...
struct  execute
 execute can be used for SQL commands which should executed the constructor is defined in a way that it can be used like a function An object of this class is not copyable More...
struct  unknown_t
struct  null_t
struct  filesystem_entry
 Result of probing a filesystem path that bundles status metadata and the failure code. More...
struct  filesystem_adapter
 Interface for querying and mutating filesystem paths before SQLite touches them. More...
class  default_filesystem_adapter
 Default adapter that simply forwards to std::filesystem. More...
struct  function_options
 Options passed alongside a callable when registering it with sqlite3_create_function_v2. More...
struct  private_accessor
 A internal used class, shall not be used from users. More...
struct  result_construct_params_private
struct  query
 query should be used to execute SQL queries An object of this class is not copyable More...
struct  result
 Forward-only cursor over the rows produced by a prepared statement. More...
struct  savepoint
 this is a helper class to handle transaction savepoints within SQLite More...
struct  session_options
 Configuration flags supplied when opening a new change session. More...
struct  session
 RAII wrapper around sqlite3_session. More...
struct  snapshot
 RAII wrapper around sqlite3_snapshot. More...
struct  statement_cache_config
 Configuration knobs for the built-in LRU statement cache. More...
class  statement_cache
 Tracks prepared statements by SQL text and hands them out on demand. More...
struct  transaction
 transaction is a helper class to start transactions within SQLite More...
struct  view
 view is used to create views. In SQLite a view can only be queried. INSERT, DELETE and UPDATE will fail on a view More...

Typedefs

typedef std::vector< std::uint8_t > blob_t
typedef std::shared_ptr< blob_tblob_ref_t
typedef std::variant< unknown_t, int, std::int64_t, long double, std::string, null_t, blob_ref_tvariant_t
using filesystem_adapter_ptr = std::shared_ptr<filesystem_adapter>
typedef std::shared_ptr< resultresult_type
 Shared-pointer alias used by legacy APIs that transfer result ownership.

Enumerations

enum class  open_mode { open_readonly , open_existing , open_or_create , always_create }
enum  type {
  unknown , null , integer , real ,
  text , blob
}
enum class  wal_mode {
  rollback , truncate , persist , memory ,
  wal , wal2
}
enum class  threading_mode { single_thread , multi_thread , serialized }
 Mirrors the sqlite3_config(SQLITE_CONFIG_*) threading options. More...
enum class  transaction_type { undefined , deferred , immediate , exclusive }
 Defines the kind of transaction to begin. More...

Functions

template<typename T>
named_parameter< std::decay_t< T > > named (std::string_view name, T &&value)
std::string append_sql_context (std::string message, std::string const &sql)
 Helper that appends [SQL: ...] context to an existing message.
template<typename Callable>
void create_function (connection &con, std::string_view name, Callable &&callable, function_options options={})
bool serialization_supported () noexcept
 Indicates whether the linked SQLite exposes the serialize/deserialise feature.
std::vector< unsigned char > serialize (connection &con, std::string_view schema="main", unsigned int flags=0)
 Copies the complete database image for schema into a byte vector.
void deserialize (connection &con, std::span< const unsigned char > image, std::string_view schema="main", bool read_only=false)
 Replaces the contents of schema with the supplied serialized image.
bool sessions_supported () noexcept
 Returns true when SQLite sessions API is available.
void apply_changeset (connection &con, std::span< const unsigned char > data)
 Applies a changeset produced by session::changeset onto con.
void apply_patchset (connection &con, std::span< const unsigned char > data)
 Applies a patchset produced by session::patchset onto con.
wal_mode set_wal_mode (connection &con, wal_mode mode)
 Force a specific WAL journal mode.
wal_mode enable_wal (connection &con, bool prefer_wal2=false)
 Enable WAL, optionally preferring WAL2 with transparent fallback.
wal_mode get_wal_mode (connection &con)
 Query the current journal mode for a connection.
std::string_view to_string (wal_mode mode)
 Convert wal_mode to the corresponding PRAGMA token.
bool snapshots_supported () noexcept
 Check if the linked SQLite library exposes snapshot helpers.
bool configure_threading (threading_mode mode)
 Calls sqlite3_config to switch SQLite into the requested threading mode.
threading_mode current_threading_mode ()
 Returns the currently configured threading_mode.

Variables

null_type nil
 nil is used instead of NULL within the operator % syntax in this wrapper