9#ifndef SL3_DATABASE_HPP_
10#define SL3_DATABASE_HPP_
15#include <sl3/command.hpp>
16#include <sl3/config.hpp>
17#include <sl3/dataset.hpp>
18#include <sl3/dbvalue.hpp>
69 explicit Database (
const std::string& name,
int openFlags = 0);
114 void execute (const
std::
string& sql);
126 void execute (const
char* sql);
223 int getMostRecentErrCode ();
231 std::
string getMostRecentErrMsg ();
242 std::
size_t getTotalChanges ();
252 std::
size_t getRecentlyChanged ();
265 int64_t getLastInsertRowid ();
336 using ConnectionPtr =
std::shared_ptr<internal::Connection>;
347 ConnectionPtr _connection;
358 std::
string getErrStr (
int errcode);
A compiled SQL command.
Definition: command.hpp:40
Transaction Guard.
Definition: database.hpp:275
Transaction(Transaction &&) noexcept
Move constructor A Transaction is movalble.
represents a SQLite3 Database
Definition: database.hpp:43
virtual ~Database() noexcept
Destructor.
Command::Callback Callback
shortcut for Command::Callback
Definition: database.hpp:139
Database(const std::string &name, int openFlags=0)
Constructor.
A utility for processing the result queries.
Definition: dataset.hpp:48
This class models the duck typing sqlite uses. It supports int, real, text, blob and null values.
Definition: dbvalue.hpp:43
A row of DbValues.
Definition: dbvalues.hpp:30
Callback for SQL Select statements.
Definition: rowcallback.hpp:30
A Container holding sl3::Type values.
Definition: types.hpp:62
Namespace of libSL3.
Definition: columns.hpp:18
Type
Definition: types.hpp:30