VSQLite++ 0.3
Loading...
Searching...
No Matches
sqlite::v2::snapshot Struct Reference

RAII wrapper around sqlite3_snapshot. More...

#include <snapshot.hpp>

Collaboration diagram for sqlite::v2::snapshot:
Collaboration graph

Public Member Functions

 snapshot ()=default
 ~snapshot ()
 snapshot (snapshot const &)=delete
snapshotoperator= (snapshot const &)=delete
 snapshot (snapshot &&other) noexcept
snapshotoperator= (snapshot &&other) noexcept
bool valid () const noexcept
 operator bool () const noexcept
void reset () noexcept
 Release the managed sqlite3_snapshot (if owned).
void open (connection &con, std::string_view schema="main") const
 Rewind an open read transaction to this snapshot.
sqlite3_snapshot * native_handle () const noexcept

Static Public Member Functions

static snapshot take (connection &con, std::string_view schema="main")
 Capture a snapshot for the provided connection/schema.

Private Member Functions

 snapshot (sqlite3_snapshot *handle)

Private Attributes

sqlite3_snapshot * handle_ = nullptr

Detailed Description

RAII wrapper around sqlite3_snapshot.

Definition at line 62 of file snapshot.hpp.

Constructor & Destructor Documentation

◆ snapshot() [1/4]

sqlite::v2::snapshot::snapshot ( )
default

◆ ~snapshot()

sqlite::v2::snapshot::~snapshot ( )

◆ snapshot() [2/4]

sqlite::v2::snapshot::snapshot ( snapshot const & )
delete

References snapshot().

Here is the call graph for this function:

◆ snapshot() [3/4]

sqlite::v2::snapshot::snapshot ( snapshot && other)
noexcept

References snapshot().

Here is the call graph for this function:

◆ snapshot() [4/4]

sqlite::v2::snapshot::snapshot ( sqlite3_snapshot * handle)
explicitprivate

Member Function Documentation

◆ native_handle()

sqlite3_snapshot * sqlite::v2::snapshot::native_handle ( ) const
inlinenoexcept

Definition at line 88 of file snapshot.hpp.

References handle_, and native_handle().

Referenced by native_handle().

Here is the call graph for this function:

◆ open()

void sqlite::v2::snapshot::open ( connection & con,
std::string_view schema = "main" ) const

Rewind an open read transaction to this snapshot.

References open().

Referenced by open().

Here is the call graph for this function:

◆ operator bool()

sqlite::v2::snapshot::operator bool ( ) const
inlineexplicitnoexcept

Definition at line 75 of file snapshot.hpp.

References valid().

Here is the call graph for this function:

◆ operator=() [1/2]

snapshot & sqlite::v2::snapshot::operator= ( snapshot && other)
noexcept

References snapshot().

Here is the call graph for this function:

◆ operator=() [2/2]

snapshot & sqlite::v2::snapshot::operator= ( snapshot const & )
delete

References snapshot().

Here is the call graph for this function:

◆ reset()

void sqlite::v2::snapshot::reset ( )
noexcept

Release the managed sqlite3_snapshot (if owned).

◆ take()

snapshot sqlite::v2::snapshot::take ( connection & con,
std::string_view schema = "main" )
static

Capture a snapshot for the provided connection/schema.

References snapshot(), and take().

Referenced by take().

Here is the call graph for this function:

◆ valid()

bool sqlite::v2::snapshot::valid ( ) const
inlinenoexcept

Definition at line 72 of file snapshot.hpp.

References handle_.

Referenced by operator bool().

Member Data Documentation

◆ handle_

sqlite3_snapshot* sqlite::v2::snapshot::handle_ = nullptr
private

Definition at line 94 of file snapshot.hpp.

Referenced by native_handle(), and valid().


The documentation for this struct was generated from the following file: