boat
C++23 geospatial library
Loading...
Searching...
No Matches
catalog.hpp
Go to the documentation of this file.
1// Andrew Naplavkov
2
3#ifndef BOAT_DB_CATALOG_HPP
4#define BOAT_DB_CATALOG_HPP
5
6#include <boat/db/meta.hpp>
7#include <boat/db/rowset.hpp>
8#include <boat/gil.hpp>
9#include <boat/tile.hpp>
10#include <stop_token>
11
12namespace boat::db {
13
14struct catalog {
15 virtual ~catalog() = default;
16
18 virtual std::vector<source> sources() = 0;
19
20 virtual std::vector<layer> layers() = 0;
21
23 std::string_view schema_name,
24 std::string_view table_name) = 0;
25
26 virtual rowset select(table const&, page const&) = 0;
27
28 virtual rowset select(table const&, bbox const&) = 0;
29
31 virtual void insert(table const&, rowset const&, std::stop_token = {}) = 0;
32
34 virtual table create(table const&) = 0;
35
36 virtual void drop(
37 std::string_view schema_name,
38 std::string_view table_name) = 0;
39
40 virtual raster get_raster(layer const&) = 0;
41
42 virtual std::generator<std::pair<tile, gil::any_image>> read(
43 raster,
44 std::vector<tile>) = 0;
45
46 virtual void
48
49 virtual void set_autocommit(bool) = 0;
50
51 virtual void commit() = 0;
52};
53
54} // namespace boat::db
55
56#endif // BOAT_DB_CATALOG_HPP
Definition geometry.hpp:9
any_image::const_view_t any_image_view
Definition gil.hpp:51
Definition meta.hpp:69
Definition catalog.hpp:14
virtual std::vector< layer > layers()=0
virtual void drop(std::string_view schema_name, std::string_view table_name)=0
virtual raster get_raster(layer const &)=0
virtual rowset select(table const &, bbox const &)=0
virtual table get_table(std::string_view schema_name, std::string_view table_name)=0
virtual std::generator< std::pair< tile, gil::any_image > > read(raster, std::vector< tile >)=0
virtual void commit()=0
virtual void set_autocommit(bool)=0
virtual std::vector< source > sources()=0
May include nested data sources.
virtual ~catalog()=default
virtual void insert(table const &, rowset const &, std::stop_token={})=0
Cancellation may leave a partially inserted range.
virtual rowset select(table const &, page const &)=0
virtual void write(raster const &, geometry::raster::box const &, gil::any_image_view)=0
virtual table create(table const &)=0
Returns metadata reported by the backend after creation.
Definition meta.hpp:18
Definition meta.hpp:81
Definition meta.hpp:93
Definition rowset.hpp:13
Definition meta.hpp:54
model::box< point > box
Definition vocabulary.hpp:71