Cppgres
Build Postgres extensions in C++
Loading...
Searching...
No Matches
set.hpp
Go to the documentation of this file.
1
4#pragma once
5
6#include <iterator>
7
8#include "datum.hpp"
9#include "imports.h"
10#include "types.hpp"
11
12namespace cppgres {
13
14template <typename I>
16 requires(I i) {
17 { std::begin(i) } -> std::forward_iterator;
18 { std::end(i) } -> std::sentinel_for<decltype(std::begin(i))>;
19 } &&
20 all_from_nullable_datum<typename std::iterator_traits<decltype(std::begin(
21 std::declval<I &>()))>::value_type>::value;
22
23template <datumable_iterator I> struct set_iterator_traits {
24 using value_type = std::iterator_traits<decltype(std::begin(std::declval<I &>()))>::value_type;
25};
26
27template <typename I> requires datumable_iterator<I>
28struct type_traits<I> {
29 static bool is(type &t) { return t.oid == RECORDOID; }
30};
31
32} // namespace cppgres
Definition: set.hpp:15
Definition: datum.hpp:163
Definition: set.hpp:23
Definition: type.hpp:41
Postgres type.
Definition: type.hpp:20