|
boat
C++23 geospatial library
|
Classes | |
| struct | kind< T > |
| struct | catalog |
| Uniform access to vector and raster data. More... | |
| struct | command |
| struct | source |
| struct | layer |
| struct | column |
| struct | index_key |
| struct | table |
| struct | bbox |
| Spatial filter for row selection. More... | |
| struct | order_key |
| struct | page |
| Pagination filter for row selection. More... | |
| struct | band |
| struct | raster |
| struct | rect |
| struct | id |
| class | query |
| struct | rowset |
| struct | variant |
| struct | kind |
| Maps a C++ type to the database-neutral type name used by boat. More... | |
| struct | kind< std::string > |
| struct | kind< blob > |
Typedefs | |
| using | null = std::monostate |
| using | variant_base = std::variant<null, int64_t, double, std::string, blob> |
Functions | |
| void | read (variant const &in, geometry::ogc99 auto &out) |
| Reads WKB from a blob; NULL produces a default-constructed geometry. | |
| void | write (variant &out, geometry::ogc99 auto const &in) |
| Serializes an OGC geometry as WKB in a blob. | |
| template<class T> requires requires { read(in, out.emplace()); } | |
| void | read (variant const &in, std::optional< T > &out) |
| NULL becomes std::nullopt. | |
| template<class T> requires requires { write(out, *in); } | |
| void | write (variant &out, std::optional< T > const &in) |
| std::nullopt becomes NULL. | |
| template<class Clock, class Duration> | |
| void | read (variant const &in, std::chrono::time_point< Clock, Duration > &out) |
| template<class Clock, class Duration> | |
| void | write (variant &out, std::chrono::time_point< Clock, Duration > in) |
| Formats a time point with microsecond precision and no time-zone suffix. | |
| auto & | operator<< (ostream auto &out, rowset const &in) |
| auto & | operator<< (ostream auto &out, table const &in) |
| auto & | operator<< (ostream auto &out, raster const &in) |
| template<class T> | |
| constexpr auto | kinds_as_array () |
| Creates a std::array from kind<Field>::value for each field of T. | |
| template<class T> | |
| table | to_table () |
| rowset | to_rowset (std::ranges::input_range auto &&r) |
| Converts a range of structures to a rowset. | |
| template<std::convertible_to< variant_base > T> | |
| void | read (variant const &in, T &out) |
| void | write (variant &out, std::convertible_to< variant_base > auto const &in) |
| template<class T> requires requires(T val) { read(var, val); } | |
| T | get (variant const &var) |
| variant | to_variant (auto const &val) |
Variables | |
| template<class T> | |
| constexpr auto | view |
| Converts a rowset row to a structure. | |
| using boat::db::null = std::monostate |
| using boat::db::variant_base = std::variant<null, int64_t, double, std::string, blob> |
| T boat::db::get | ( | variant const & | var | ) |
|
constexpr |
Creates a std::array from kind<Field>::value for each field of T.
| auto & boat::db::operator<< | ( | ostream auto & | out, |
| raster const & | in ) |
| auto & boat::db::operator<< | ( | ostream auto & | out, |
| rowset const & | in ) |
| auto & boat::db::operator<< | ( | ostream auto & | out, |
| table const & | in ) |
| void boat::db::read | ( | variant const & | in, |
| geometry::ogc99 auto & | out ) |
Reads WKB from a blob; NULL produces a default-constructed geometry.
| void boat::db::read | ( | variant const & | in, |
| std::chrono::time_point< Clock, Duration > & | out ) |
Parses "YYYY-MM-DD HH:MM:SS[.ffffff]" without a time-zone conversion. NULL is converted to the clock epoch; excess fractional digits are ignored.
| void boat::db::read | ( | variant const & | in, |
| std::optional< T > & | out ) |
NULL becomes std::nullopt.
| void boat::db::read | ( | variant const & | in, |
| T & | out ) |
NULL becomes T{}.
| std::bad_variant_access | if the stored type is incompatible with T. |
| rowset boat::db::to_rowset | ( | std::ranges::input_range auto && | r | ) |
Converts a range of structures to a rowset.
| table boat::db::to_table | ( | ) |
| variant boat::db::to_variant | ( | auto const & | val | ) |
| void boat::db::write | ( | variant & | out, |
| geometry::ogc99 auto const & | in ) |
Serializes an OGC geometry as WKB in a blob.
| void boat::db::write | ( | variant & | out, |
| std::chrono::time_point< Clock, Duration > | in ) |
Formats a time point with microsecond precision and no time-zone suffix.
| void boat::db::write | ( | variant & | out, |
| std::convertible_to< variant_base > auto const & | in ) |
| void boat::db::write | ( | variant & | out, |
| std::optional< T > const & | in ) |
std::nullopt becomes NULL.
|
constexpr |
Converts a rowset row to a structure.