10#define SL3_COLUMNS_HPP
12#include <sl3/config.hpp>
13#include <sl3/dbvalues.hpp>
Class to access data of query results.
Definition: columns.hpp:38
std::vector< std::string > getNames() const
Get columns names.
int count() const
Number of columns in the statement.
std::string getName(int idx) const
Column name of given index.
Blob getBlob(int idx) const
Get the value of a column.
DbValues getRow() const
Get all columns at once.
int64_t getInt64(int idx) const
Get the value of a column.
sqlite3_stmt * get_stmt() const
Get the underlying sqlite3_stmt.
Definition: columns.hpp:230
~Columns()=default
Destructor.
DbValue getValue(int idx) const
Get the value at a given index.
std::string getText(int idx) const
Get the value of a column.
Type getType(int idx) const
Get the sqlite type for a column.
size_t getSize(int idx) const
Get the size of a column.
Columns(Columns &&)=default
Move constructor A column is movable.
DbValue getValue(int idx, Type type) const
Get the value at a given index.
int getInt(int idx) const
Get the value of a column.
DbValues getRow(const Types &types) const
Get all columns at once using the given types.
double getReal(int idx) const
Get the value of a column.
A compiled SQL command.
Definition: command.hpp:40
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
A Container holding sl3::Type values.
Definition: types.hpp:62
Namespace of libSL3.
Definition: columns.hpp:18
Type
Definition: types.hpp:30
std::vector< std::byte > Blob
Definition: types.hpp:126