5#ifndef BOOST_SQLITE_FIELD_HPP
6#define BOOST_SQLITE_FIELD_HPP
8#include <boost/sqlite/detail/config.hpp>
9#include <boost/sqlite/blob.hpp>
10#include <boost/sqlite/cstring_ref.hpp>
11#include <boost/sqlite/value.hpp>
13#include <boost/core/detail/string_view.hpp>
16BOOST_SQLITE_BEGIN_NAMESPACE
26 return static_cast<value_type>( sqlite3_column_type(stm_, col_));
31 return type() == value_type::null;
34 explicit operator bool ()
const
36 return type() != value_type::null;
41 return sqlite3_column_int(stm_, col_);
46 return sqlite3_column_int64(stm_, col_);
51 return sqlite3_column_double(stm_, col_);
62 return value(sqlite3_column_value(stm_, col_));
67 return sqlite3_column_name(stm_, col_);
72 return sqlite3_column_table_name(stm_, col_);
77 return sqlite3_column_origin_name(stm_, col_);
86BOOST_SQLITE_END_NAMESPACE
value_type
The type of a value.
a view to a binary large object
Small wrapper for a null-terminated string that can be directly passed to C APIS.
A holder for a sqlite field, i.e. something returned from a query.
cstring_ref table_name() const
Returns the name of the table.
value_type type() const
The type of the value.
cstring_ref get_text() const
Returns the value as text, i.e. a string_view. Note that this value may be invalidated`.
double get_double() const
Returns the value as an double.
cstring_ref column_origin_name() const
Returns the name of the original data source.
sqlite3_int64 get_int64() const
Returns the value as an int64.
int get_int() const
Returns the value as regular int.
bool is_null() const
Is the held value null.
cstring_ref column_name() const
Returns the name of the column.
value get_value() const
Returns the field as a value.
blob_view get_blob() const
Returns the value as blob, i.e. raw memory. Note that this value may be invalidated`.
Representation of a row in a database.
A holder for a sqlite values used for internal APIs.