Joedb 10.2.1
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
ids.h
Go to the documentation of this file.
1/////////////////////////////////////////////////////////////////////////////
2//
3// This code was automatically generated by the joedb compiler
4// https://www.joedb.org/
5//
6// Path to compiler: /home/rcoulom/repos/joedb/compcmake/gcc_debug/joedbc
7// Version: 10.2.1
8// joedbc compilation time: Sep 15 2025 20:22:33
9// Generation of this file: 2025-09-15 18:23:01 GMT
10//
11/////////////////////////////////////////////////////////////////////////////
12#ifndef tutorial_rpc_population_ids_declared
13#define tutorial_rpc_population_ids_declared
14
15#include "../../ids.h"
16
18{
19 using joedb::Record_Id;
20 using joedb::Table_Id;
21 using joedb::Field_Id;
22
24
25 /// Strongly-typed wrapper around an integer representing a row of the data table
27 {
28 private:
29 Record_Id id;
30
31 public:
32 constexpr explicit id_of_data(joedb::index_t id): id(Record_Id(id)) {}
33 constexpr explicit id_of_data(Record_Id id): id(id) {}
34 constexpr id_of_data(): id(joedb::Record_Id::null) {}
35 constexpr bool is_null() const {return id.is_null();}
36 constexpr bool is_not_null() const {return id.is_not_null();}
37 constexpr auto get_id() const {return to_underlying(id);}
38 constexpr Record_Id get_record_id() const {return id;}
39 constexpr bool operator==(id_of_data x) const {return id == x.id;}
40 constexpr bool operator!=(id_of_data x) const {return id != x.id;}
41 constexpr bool operator<(id_of_data x) const {return id < x.id;}
42 constexpr bool operator>(id_of_data x) const {return id > x.id;}
43 constexpr bool operator<=(id_of_data x) const {return id <= x.id;}
44 constexpr bool operator>=(id_of_data x) const {return id >= x.id;}
45 constexpr id_of_data operator[](size_t i) const {return id_of_data(id + i);}
46 };
47}
48
49#endif
Strongly-typed wrapper around an integer representing a row of the city table.
Definition ids.h:25
Strongly-typed wrapper around an integer representing a row of the data table.
Definition ids.h:27
constexpr bool is_null() const
Definition ids.h:35
constexpr id_of_data(joedb::index_t id)
Definition ids.h:32
constexpr auto get_id() const
Definition ids.h:37
constexpr bool operator<(id_of_data x) const
Definition ids.h:41
constexpr id_of_data(Record_Id id)
Definition ids.h:33
constexpr bool is_not_null() const
Definition ids.h:36
constexpr bool operator>=(id_of_data x) const
Definition ids.h:44
constexpr id_of_data operator[](size_t i) const
Definition ids.h:45
constexpr bool operator>(id_of_data x) const
Definition ids.h:42
constexpr bool operator!=(id_of_data x) const
Definition ids.h:40
constexpr bool operator==(id_of_data x) const
Definition ids.h:39
constexpr Record_Id get_record_id() const
Definition ids.h:38
constexpr bool operator<=(id_of_data x) const
Definition ids.h:43
ptrdiff_t index_t
Definition index_types.h:18
Automatically generated by joedbc.
Definition Client.h:19