1#ifndef tutorial_rpc_Service_declared
2#define tutorial_rpc_Service_declared
34 if (city_id.is_null())
50 if (city_id.is_not_null())
61 const auto &db = client.get_database();
63 for (
const auto data:
population.get_data_table())
65 const std::string &city_name =
population.get_city_name(data);
70 if (
city.is_not_null())
71 for (
const auto person: db.get_person_table())
72 if (db.get_home(person) ==
city)
85 if (message_city.is_not_null())
87 const auto &db = client.get_database();
89 const auto city = db.find_city_by_name(message.
get_name(message_city));
90 if (
city.is_not_null())
92 for (
const auto person: db.get_person_table())
94 if (db.get_home(person) ==
city)
98 db.get_first_name(person),
99 db.get_last_name(person),
const std::string & get_name(id_of_city record) const
container_of_city get_city_table() const
id_of_city find_city_by_name(std::string_view field_value_of_name) const
A Database that contains a joedb::Writable_Journal and keeps them in sync.
id_of_person new_person()
void delete_city(id_of_city record)
Strongly-typed wrapper around an integer representing a row of the city table.
Specialization of joedb::rpc::Client.
void get_inhabitants(tutorial::Writable_Database &message)
A message can have the same schema as the main database.
void get_population(population::Writable_Database &population)
A procedure can return values by writing them to the message database.
void delete_city(city::Writable_Database &city)
Delete a city from a name string.
void insert_city(city::Writable_Database &city)
Insert a city from a name string.
A Database that contains a joedb::Writable_Journal and keeps them in sync.
A Database that contains a joedb::Writable_Journal and keeps them in sync.
Automatically generated by joedbc.
Automatically generated by joedbc.