-
Notifications
You must be signed in to change notification settings - Fork 0
/
DbService.proto
163 lines (133 loc) · 2.57 KB
/
DbService.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
syntax="proto3";
package com.yue.dbservice;
// get
message getRequest{
string dataSource =1;
string table=2;
string paras=3;
}
message getResponse{
string result=1;
}
// getOne
message getOneRequest{
string dataSource=1;
string table=2;
string where=3;
string paras=4;
}
message getOneResponse{
string result=1;
}
// list
message listRequest{
string dataSource=1;
string table=2;
string where=3;
}
message listResponse{
string result=1;
}
// save
message saveRequest{
string dataSource=1;
string table=2;
string where=3;
string paras=4;
}
message saveResponse{
string result=1;
}
// update
message updateRequest{
string dataSource=1;
string table=2;
string where=3;
string paras=4;
}
message updateResponse{
bool result=1;
}
// del
message delRequest{
string dataSource=1;
string table=2;
string id=3;
}
message delResponse{
bool result=1;
}
// multiGet
message multiGetRequest{
string dataSource=1;
string table=2;
string id=3;
string field=4;
}
message multiGetResponse{
string result=1;
}
// toOne
message toOneRequest{
string dataSource=1;
string table=2;
string where=3;
string paras=4;
string result=5;
}
message toOneResponse{
string result=1;
}
//toMany
message toManyRequest{
string dataSource=1;
string table=2;
string where=3;
string paras=4;
string result=5;
}
message toManyResponse{
string result=1;
}
// count
message countRequest{
string dataSource=1;
string table=2;
string where=3;
}
message countResponse{
string result=1;
}
// sum
message sumRequest{
string dataSource=1;
string table=2;
string where=3;
string field=4;
}
message sumResponse{
string result=1;
}
// query
message queryRequest{
string dataSource=1;
string rawQuery=2;
string where=3;
}
message queryResponse{
string result=1;
}
service DbService{
rpc get(getRequest) returns (getResponse){}
rpc getOne(getOneRequest) returns (getOneResponse){}
rpc list(listRequest) returns (listResponse){}
rpc save(saveRequest) returns (saveResponse){}
rpc update(updateRequest) returns (updateResponse){}
rpc del(delRequest) returns (delResponse){}
rpc multiGet(multiGetRequest) returns (multiGetResponse){}
rpc toOne(toOneRequest) returns (toOneResponse){}
rpc toMany(toManyRequest) returns (toManyResponse){}
rpc count(countRequest) returns (countResponse){}
rpc sum(sumRequest) returns (sumResponse){}
rpc query(queryRequest) returns (queryResponse){}
}