File tree Expand file tree Collapse file tree 10 files changed +95
-1
lines changed Expand file tree Collapse file tree 10 files changed +95
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ option java_package = "com.vaticle.typedb.protocol";
21
21
option java_outer_classname = "ClusterServiceProto" ;
22
22
option java_generic_services = true ;
23
23
24
-
25
24
import "cluster/cluster_server.proto" ;
26
25
import "cluster/cluster_user.proto" ;
27
26
import "cluster/cluster_database.proto" ;
Original file line number Diff line number Diff line change @@ -30,6 +30,14 @@ proto_library(
30
30
srcs = ["concept.proto" ],
31
31
)
32
32
33
+ proto_library (
34
+ name = "connection-proto" ,
35
+ srcs = ["connection.proto" ],
36
+ deps = [
37
+ ":version-proto" ,
38
+ ],
39
+ )
40
+
33
41
proto_library (
34
42
name = "logic-proto" ,
35
43
srcs = ["logic.proto" ],
@@ -69,6 +77,11 @@ proto_library(
69
77
]
70
78
)
71
79
80
+ proto_library (
81
+ name = "version-proto" ,
82
+ srcs = ["version.proto" ],
83
+ )
84
+
72
85
# TODO: THIS SHOULD BE MADE TO STOP EXISTING
73
86
# This exists to support the nodejs build- when it becomes a real rule, we should extract the .src_files
74
87
# from the above proto_library rules, but for now this is required to get the source files.
@@ -77,11 +90,13 @@ filegroup(
77
90
srcs = [
78
91
"answer.proto" ,
79
92
"concept.proto" ,
93
+ "connection.proto" ,
80
94
"options.proto" ,
81
95
"query.proto" ,
82
96
"session.proto" ,
83
97
"transaction.proto" ,
84
98
"logic.proto" ,
99
+ "version.proto" ,
85
100
]
86
101
)
87
102
Original file line number Diff line number Diff line change
1
+ //
2
+ // Copyright (C) 2022 Vaticle
3
+ //
4
+ // This program is free software: you can redistribute it and/or modify
5
+ // it under the terms of the GNU Affero General Public License as
6
+ // published by the Free Software Foundation, either version 3 of the
7
+ // License, or (at your option) any later version.
8
+ //
9
+ // This program is distributed in the hope that it will be useful,
10
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ // GNU Affero General Public License for more details.
13
+ //
14
+ // You should have received a copy of the GNU Affero General Public License
15
+ // along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ //
17
+
18
+ syntax = "proto3" ;
19
+
20
+ option java_package = "com.vaticle.typedb.protocol" ;
21
+ option java_outer_classname = "ConnectionProto" ;
22
+ option java_generic_services = true ;
23
+
24
+ import "common/version.proto" ;
25
+
26
+ package typedb.protocol ;
27
+
28
+ message Connection {
29
+
30
+ message Open {
31
+ message Req {
32
+ Version version = 1 ;
33
+ }
34
+
35
+ message Res {}
36
+ }
37
+ }
Original file line number Diff line number Diff line change
1
+ //
2
+ // Copyright (C) 2022 Vaticle
3
+ //
4
+ // This program is free software: you can redistribute it and/or modify
5
+ // it under the terms of the GNU Affero General Public License as
6
+ // published by the Free Software Foundation, either version 3 of the
7
+ // License, or (at your option) any later version.
8
+ //
9
+ // This program is distributed in the hope that it will be useful,
10
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ // GNU Affero General Public License for more details.
13
+ //
14
+ // You should have received a copy of the GNU Affero General Public License
15
+ // along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ //
17
+
18
+ syntax = "proto3" ;
19
+
20
+ option java_package = "com.vaticle.typedb.protocol" ;
21
+ option java_outer_classname = "VersionProto" ;
22
+ option java_generic_services = true ;
23
+
24
+ package typedb.protocol ;
25
+
26
+ enum Version {
27
+ // reserved; // add past version numbers into the reserved range
28
+ UNSPECIFIED = 0 ;
29
+ VERSION = 1 ;
30
+ }
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ proto_library(
29
29
srcs = ["core_service.proto" ],
30
30
deps = [
31
31
"//core:database-proto" ,
32
+ "//common:connection-proto" ,
32
33
"//common:session-proto" ,
33
34
"//common:transaction-proto" ,
34
35
],
Original file line number Diff line number Diff line change @@ -22,13 +22,17 @@ option java_outer_classname = "CoreServiceProto";
22
22
option java_generic_services = true ;
23
23
24
24
import "core/core_database.proto" ;
25
+ import "common/connection.proto" ;
25
26
import "common/session.proto" ;
26
27
import "common/transaction.proto" ;
27
28
28
29
package typedb.protocol ;
29
30
30
31
service TypeDB {
31
32
33
+ // Connection API
34
+ rpc connection_open (Connection .Open .Req ) returns (Connection .Open .Res );
35
+
32
36
// Database Manager API
33
37
rpc databases_contains (CoreDatabaseManager .Contains .Req ) returns (CoreDatabaseManager .Contains .Res );
34
38
rpc databases_create (CoreDatabaseManager .Create .Req ) returns (CoreDatabaseManager .Create .Res );
Original file line number Diff line number Diff line change @@ -32,11 +32,13 @@ java_grpc_compile(
32
32
"//cluster:database-proto" ,
33
33
"//common:answer-proto" ,
34
34
"//common:concept-proto" ,
35
+ "//common:connection-proto" ,
35
36
"//common:logic-proto" ,
36
37
"//common:options-proto" ,
37
38
"//common:query-proto" ,
38
39
"//common:session-proto" ,
39
40
"//common:transaction-proto" ,
41
+ "//common:version-proto" ,
40
42
"//core:database-proto" ,
41
43
"//core:service-proto" ,
42
44
]
Original file line number Diff line number Diff line change @@ -47,11 +47,13 @@ ts_grpc_compile(
47
47
"//cluster:service-proto" , # TODO: do we need this?
48
48
"//common:answer-proto" ,
49
49
"//common:concept-proto" ,
50
+ "//common:connection-proto" ,
50
51
"//common:logic-proto" ,
51
52
"//common:options-proto" ,
52
53
"//common:query-proto" ,
53
54
"//common:session-proto" ,
54
55
"//common:transaction-proto" ,
56
+ "//common:version-proto" ,
55
57
"//core:database-proto" ,
56
58
"//core:service-proto" , # TODO: do we need this?
57
59
],
Original file line number Diff line number Diff line change @@ -31,11 +31,13 @@ python_grpc_compile(
31
31
"//cluster:service-proto" ,
32
32
"//common:answer-proto" ,
33
33
"//common:concept-proto" ,
34
+ "//common:connection-proto" ,
34
35
"//common:logic-proto" ,
35
36
"//common:options-proto" ,
36
37
"//common:query-proto" ,
37
38
"//common:session-proto" ,
38
39
"//common:transaction-proto" ,
40
+ "//common:version-proto" ,
39
41
"//core:database-proto" ,
40
42
"//core:service-proto" ,
41
43
],
Original file line number Diff line number Diff line change @@ -31,11 +31,13 @@ rust_tonic_compile(
31
31
"//cluster:database-proto" ,
32
32
"//common:answer-proto" ,
33
33
"//common:concept-proto" ,
34
+ "//common:connection-proto" ,
34
35
"//common:logic-proto" ,
35
36
"//common:options-proto" ,
36
37
"//common:query-proto" ,
37
38
"//common:session-proto" ,
38
39
"//common:transaction-proto" ,
40
+ "//common:version-proto" ,
39
41
"//core:database-proto" ,
40
42
"//core:service-proto" ,
41
43
]
You can’t perform that action at this time.
0 commit comments