File tree Expand file tree Collapse file tree 2 files changed +40
-1
lines changed Expand file tree Collapse file tree 2 files changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -18,4 +18,5 @@ set(CMAKE_CXX_STANDARD 20)
18
18
#add_executable(ocp OCP/ocp_using_runtime_concet.cpp)
19
19
#add_executable(lsp LSP/lsp_classic_example.cpp)
20
20
#add_executable(lsp LSP/lsp_better_example.cpp)
21
- add_executable (lspcovarient LSP/lsp_covariance_example.cpp )
21
+ #add_executable(lspcovarient LSP/lsp_covariance_example.cpp)
22
+ add_executable (lspqueryset LSP/lsp_query_set.cpp )
Original file line number Diff line number Diff line change
1
+ //
2
+ // Created by sajith on 4/17/21.
3
+ //
4
+
5
+ #include < iostream>
6
+ #include < vector>
7
+
8
+
9
+ template <typename Model>
10
+ class ORMQueryset
11
+ {
12
+ public:
13
+ virtual ~ORMQueryset () = default ;
14
+ virtual ORMQueryset &filterObjects (std::string, std::string) const = 0;
15
+ virtual ORMQueryset &orderObjects (std::string, std::string) const = 0;
16
+ virtual std::vector<Model> getObjects () const = 0;
17
+ virtual unsigned updateObjects () = 0;
18
+ virtual unsigned deleteObjects () = 0;
19
+ };
20
+
21
+
22
+ template <typename Model>
23
+ class Database1ORMQueryset : public ORMQueryset <Model>
24
+ {
25
+ public:
26
+ ORMQueryset<Model> &filterObjects (std::string, std::string) const override ;
27
+
28
+ ORMQueryset<Model> &orderObjects (std::string, std::string) const override ;
29
+
30
+ std::vector<Model> getObjects () const override ;
31
+
32
+ unsigned updateObjects () override ;
33
+
34
+ unsigned deleteObjects () override ;
35
+ };
36
+
37
+
38
+
You can’t perform that action at this time.
0 commit comments