ThinSQLite++
A thin, safe and convenient modern C++ wrapper for SQLite API.
Loading...
Searching...
No Matches
snapshot Class Referencefinal

A database snapshot. More...

Inheritance diagram for snapshot:
handle< sqlite3_snapshot, snapshot >

Public Member Functions

 ~snapshot () noexcept
 Equivalent to sqlite3_snapshot_free.
 
void operator delete (void *) noexcept
 Operator delete for a fake pointer is no-op.
 
sqlite3_snapshotc_ptr () const noexcept
 Access the real underlying SQLite type.
 

Static Public Member Functions

static snapshotfrom (sqlite3_snapshot *obj) noexcept
 Create fake pointer from the underlying SQLite one.
 

Friends

int compare (const snapshot &lhs, const snapshot &rhs) noexcept
 Compare the ages of two snapshots.
 
bool operator== (const snapshot &lhs, const snapshot &rhs) noexcept
 
bool operator!= (const snapshot &lhs, const snapshot &rhs) noexcept
 
C++20 comparison operator. Not present in C++17
std::strong_ordering operator<=> (const snapshot &lhs, const snapshot &rhs) noexcept
 
C++17 comparison operators. Not present in C++20
bool operator< (const snapshot &lhs, const snapshot &rhs) noexcept
 
bool operator<= (const snapshot &lhs, const snapshot &rhs) noexcept
 
bool operator> (const snapshot &lhs, const snapshot &rhs) noexcept
 
bool operator>= (const snapshot &lhs, const snapshot &rhs) noexcept
 

Detailed Description

A database snapshot.

This is a fake wrapper class for sqlite3_snapshot.

Use database::get_snapshot to create snapshot objects.

Since
SQLite 3.10

Requires THINSQLITEPP_ENABLE_EXPIREMENTAL macro to be defined to 1 as the underlying SQLite feature is experimental.

#include <thinsqlitepp/snapshot.hpp>

Friends And Related Symbol Documentation

◆ compare

int compare ( const snapshot & lhs,
const snapshot & rhs )
friend

Compare the ages of two snapshots.

Equivalent to sqlite3_snapshot_cmp