Samchon Framework for CPP  1.0.0
ISQLEntity.hpp
1 #pragma once
2 
3 #include <string>
4 #include <memory>
5 
6 namespace samchon
7 {
8 namespace library
9 {
10  class SQLStatement;
11 };
12 
13 namespace protocol
14 {
31  class ISQLEntity
32  {
33  public:
34  virtual ~ISQLEntity() = default;
35 
48  virtual void load(std::shared_ptr<library::SQLStatement> stmt) {};
49 
61  virtual void archive(std::shared_ptr<library::SQLStatement> stmt) {};
62 
75  virtual auto toSQL() const -> std::string
76  {
77  return "";
78  };
79  };
80 };
81 };
virtual void load(std::shared_ptr< library::SQLStatement > stmt)
Load data of entity from DB.
Definition: ISQLEntity.hpp:48
An interface supporting DB-I/O.
Definition: ISQLEntity.hpp:31
virtual void archive(std::shared_ptr< library::SQLStatement > stmt)
Archive data of entity to DB.
Definition: ISQLEntity.hpp:61
virtual auto toSQL() const -> std::string
Get a sql-statement string represents the entity.
Definition: ISQLEntity.hpp:75