/
graph_def.proto
129 lines (113 loc) · 2.83 KB
/
graph_def.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
// Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto3";
package gs.rpc.graph;
import "google/protobuf/any.proto";
option java_package = "com.alibaba.graphscope.proto.ddl";
option java_multiple_files = true;
enum GraphTypePb {
UNKNOWN_TYPE = 0;
IMMUTABLE_EDGECUT = 1;
DYNAMIC_PROPERTY = 2;
DYNAMIC_PROJECTED = 3;
ARROW_PROPERTY = 4;
ARROW_PROJECTED = 5;
PERSISTENT_STORE = 6;
}
message MaxGraphInfoPb {
int32 last_label_id = 1;
int32 last_property_id = 2;
int64 last_table_id = 3;
}
message VineyardInfoPb {
DataTypePb oid_type = 1;
DataTypePb vid_type = 2;
DataTypePb vdata_type = 3;
DataTypePb edata_type = 4;
string schema_path = 5;
bool generate_eid = 6;
int64 vineyard_id = 7;
string property_schema_json = 8;
}
message GraphDefPb {
int64 version = 1;
string key = 2;
GraphTypePb graph_type = 3;
bool directed = 4;
repeated TypeDefPb type_defs = 5;
repeated EdgeKindPb edge_kinds = 6;
map<string, int32> property_name_to_id = 7;
// current extension supported:
// - MaxGraphInfoPb
// - VineyardInfoPb
google.protobuf.Any extension = 8;
}
message TypeDefPb {
int32 version_id = 1;
string label = 2;
LabelIdPb label_id = 3;
TypeEnumPb type_enum = 4;
repeated PropertyDefPb props = 5;
}
message LabelIdPb {
int32 id = 1;
}
enum TypeEnumPb {
UNSPECIFIED = 0;
VERTEX = 1;
EDGE = 2;
}
message PropertyDefPb {
int32 id = 1;
int32 inner_id = 2;
string name = 3;
DataTypePb data_type = 4;
PropertyValuePb default_value = 5;
bool pk = 6;
string comment = 7;
}
enum DataTypePb {
UNKNOWN = 0;
BOOL = 1;
CHAR = 2;
SHORT = 3;
INT = 4;
LONG = 5;
FLOAT = 6;
DOUBLE = 7;
STRING = 8;
BYTES = 9;
INT_LIST = 10;
LONG_LIST = 11;
FLOAT_LIST = 12;
DOUBLE_LIST = 13;
STRING_LIST = 14;
NULLVALUE = 15;
UINT = 16;
ULONG = 17;
DYNAMIC = 18;
}
message PropertyValuePb {
DataTypePb data_type = 1;
bytes val = 2;
}
message EdgeKindPb {
string edge_label = 1;
LabelIdPb edge_label_id = 2;
string src_vertex_label = 3;
LabelIdPb src_vertex_label_id = 4;
string dst_vertex_label = 5;
LabelIdPb dst_vertex_label_id = 6;
}