/
ArtT
/
Netology
Обзор
Документация
Войти
/
ArtT
/
Netology
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Part4_SQL/Task_4_3_1/ClientDB.h
44 строки
932 B
ArtT
Изменил тип возвращаемого значения в функции find_client для задания 4_3_1
29 апр 2026, 08:26
29 апр 2026, 08:26
23fa359
Код
Авторство
О чём код?
#ifndef CLIENTDB_H #define CLIENTDB_H #include <pqxx/pqxx> #include <string> #include <vector> struct Client { int id; std::string first_name; std::string last_name; std::string email; std::vector<std::string> phones; }; class ClientDB { public: explicit ClientDB(const std::string& conn_str) : conn_(conn_str) {} void create_tables(); int add_client(const std::string& first_name, const std::string& last_name, const std::string& email = ""); void add_phone(int client_id, const std::string& phone); void update_client(int client_id, const std::string& first_name, const std::string& last_name, const std::string& email); void delete_phone(int client_id, const std::string& phone); void delete_client(int client_id); std::vector<Client> find_client(const std::string& search); private: pqxx::connection conn_; }; #endif