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

RAII wrapper around sqlite3_session. More...

#include <session.hpp>

Collaboration diagram for sqlite::v2::session:
Collaboration graph

Public Member Functions

 session (connection &con, std::string_view schema="main", session_options options={})
 ~session ()
 session (session &&other) noexcept
sessionoperator= (session &&other) noexcept
 session (session const &)=delete
sessionoperator= (session const &)=delete
void attach (std::string_view table)
void attach_all ()
void enable (bool value)
void set_indirect (bool value)
std::vector< unsigned char > changeset ()
 Serializes the recorded changes in the standard changeset format.
std::vector< unsigned char > patchset ()
 Serializes the recorded changes in the smaller patchset format.
void * native_handle () const noexcept

Private Member Functions

std::vector< unsigned char > collect (bool patchset)

Private Attributes

connectioncon_
void * handle_

Detailed Description

RAII wrapper around sqlite3_session.

Call attach() or attach_all() to declare which tables to monitor, then retrieve accumulated changes via changeset() / patchset().

Definition at line 63 of file session.hpp.

Constructor & Destructor Documentation

◆ session() [1/3]

sqlite::v2::session::session ( connection & con,
std::string_view schema = "main",
session_options options = {} )

Referenced by operator=(), operator=(), session(), and session().

◆ ~session()

sqlite::v2::session::~session ( )

◆ session() [2/3]

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

References session().

Here is the call graph for this function:

◆ session() [3/3]

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

References session().

Here is the call graph for this function:

Member Function Documentation

◆ attach()

void sqlite::v2::session::attach ( std::string_view table)

◆ attach_all()

void sqlite::v2::session::attach_all ( )

◆ changeset()

std::vector< unsigned char > sqlite::v2::session::changeset ( )

Serializes the recorded changes in the standard changeset format.

◆ collect()

std::vector< unsigned char > sqlite::v2::session::collect ( bool patchset)
private

References collect(), and patchset().

Referenced by collect().

Here is the call graph for this function:

◆ enable()

void sqlite::v2::session::enable ( bool value)

◆ native_handle()

void * sqlite::v2::session::native_handle ( ) const
noexcept

◆ operator=() [1/2]

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

References session().

Here is the call graph for this function:

◆ operator=() [2/2]

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

References session().

Here is the call graph for this function:

◆ patchset()

std::vector< unsigned char > sqlite::v2::session::patchset ( )

Serializes the recorded changes in the smaller patchset format.

Referenced by collect().

◆ set_indirect()

void sqlite::v2::session::set_indirect ( bool value)

Member Data Documentation

◆ con_

connection* sqlite::v2::session::con_
private

Definition at line 86 of file session.hpp.

◆ handle_

void* sqlite::v2::session::handle_
private

Definition at line 87 of file session.hpp.


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