groot.sdk.schema.proto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of groot-client Show documentation
Show all versions of groot-client Show documentation
The Java client of Groot, a persistence storage engine
/**
* Copyright 2020 Alibaba Group Holding Limited.
*
* 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.groot;
option java_package = "com.alibaba.graphscope.proto.groot";
option java_multiple_files = true;
// for Meta
message TypeIdProto {
uint32 id = 1;
enum Type {
VERTEX = 0;
EDGE = 1;
}
Type type = 2;
}
message PropertyDefProto {
int32 id = 1;
string name = 2;
int32 dataType = 3;
string typeExpression = 4;
string comment = 5;
bool hasDefaultValue = 6;
bytes defaultValue = 7;
}
message TypeDefProto {
int32 id = 1;
string label = 2;
TypeIdProto.Type type = 3;
bool isDimensionType = 4;
repeated PropertyDefProto property = 5;
repeated IndexDefProto index = 6;
string comment = 7;
int32 version = 8;
repeated RelationShipReq rawRelationShip = 9;
repeated RelationShipProto relationShip = 10;
TypeOptionProto option = 11;
map gidToPid = 12;
}
message TypeOptionProto {
StorageEngine storageEngine = 1;
}
enum StorageEngine {
MEMORY = 0;
ROCKSDB = 1;
}
message RelationShipProto {
TypeIdProto srcId = 1;
TypeIdProto dstId = 2;
TypeIdProto edgeId = 3;
}
message RelationShipWithTypeProto {
TypeDefProto srcVertex = 1;
TypeDefProto edgeType = 2;
TypeDefProto dstVertex = 3;
}
message IndexDefProto {
string name = 1;
repeated int32 propertyId = 2;
enum Type {
PRIMARY_KEY = 0;
UNIQUE = 1;
UNIQUE_WITH_EDGE = 2;
}
Type indexType = 3;
repeated string property = 4;
}
message SchemaProto {
repeated TypeDefProto type = 1;
int32 partitionNum = 2;
int32 version = 3;
}
// schema operation proto
message CreateVertexTypeReq {
string label = 1;
repeated PropertyDefProto property = 2;
// deprecated
repeated string pks = 3;
string comment = 4;
bool isDimensionType = 5;
TypeOptionProto option = 6;
repeated IndexDefProto index = 7;
}
message CreateEdgeTypeReq {
string label = 1;
repeated PropertyDefProto property = 2;
string comment = 3;
repeated RelationShipReq relationShip = 4;
bool isDimensionType = 5;
TypeOptionProto option = 6;
repeated IndexDefProto index = 7;
}
message TypeReq {
int32 schemaVersion = 1;
int32 typeVersion = 2;
string label = 3;
TypeIdProto typeId = 4;
}
message AddTypePropertyReq {
string label = 1;
repeated PropertyDefProto property = 2;
}
message UpdateTypePropertyReq {
string label = 1;
repeated PropertyDefProto property = 2;
}
message DropTypePropertyReq {
string label = 1;
repeated string propertyName = 2;
}
message RelationShipReq {
string edgeLabel = 1;
string srcVertexLabel = 2;
string dstVertexLabel = 3;
}
message RelationShipResp {
Response resp = 1;
repeated RelationShipProto relationShips = 2;
}
message AddIndexReq {
string label = 1;
string name = 2;
IndexDefProto.Type indexType = 3;
repeated string property = 4;
}
message DropIndexReq {
string label = 1;
string name = 2;
}
message SchemaReq {
int32 schemaVersion = 1;
}
message VersionedSchemaResp {
Response resp = 1;
SchemaProto schema = 2;
}
message Response {
int32 errCode = 1;
string errMsg = 2;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy