scclib-sqlite
Stable Cloud Computing Sqlite Library
Public Member Functions | Friends | List of all members
scc::sqld::Conn Class Reference

Database connection. More...

#include <sqld.h>

Public Member Functions

 Conn (const std::string &="file:mem?mode=memory&cache=shared")
 Constructs and open a sqlite in-memory database connection.
 
 Conn (const Conn &)=delete
 
Connoperator= (const Conn &)=delete
 
 Conn (Conn &&)=delete
 
Connoperator= (Conn &&)=delete
 
void reopen (const std::string &="file:mem?mode=memory&cache=shared")
 Reopen the connection. More...
 

Friends

class Req
 

Detailed Description

Database connection.

Uses the uri method to specifiy a connection.

The default is a shared cache connection to an in-memory database.

Once constructed or reopened, a database connection is thread-safe.

Examples
unittest/sqld.cc.

Definition at line 61 of file sqld.h.

Member Function Documentation

◆ reopen()

void Conn::reopen ( const std::string &  uri = "file:mem?mode=memory&cache=shared")

Reopen the connection.

The database will be destroyed and reopened. This command is not thread-safe.

Definition at line 69 of file sqld.cc.


The documentation for this class was generated from the following files: