Current section
Files
Jump to
Current section
Files
priv/thrift/common.thrift
/* Copyright (c) 2018 vesoft inc. All rights reserved.
* Source: https://github.com/vesoft-inc/nebula
* License: Apache 2.0
*
* Vendored for nebula_graph_ex — DO NOT HAND-EDIT.
* Update by replacing this file with the upstream version and re-running
* `mix compile`. The elixir namespace below is the only addition.
*/
namespace cpp nebula
namespace java com.vesoft.nebula
namespace go nebula
namespace js nebula
namespace csharp nebula
namespace py nebula3.common
namespace elixir NebulexGraph.Thrift.Generated.Common
const binary version = "3.0.0"
typedef i64 ClusterID
typedef i32 GraphSpaceID
typedef i32 PartitionID
typedef i32 TagID
typedef i32 EdgeType
typedef i64 EdgeRanking
typedef i64 LogID
typedef i64 TermID
typedef i64 Timestamp
typedef i32 IndexID
typedef i32 Port
typedef i64 SessionID
typedef i64 ExecutionPlanID
union SchemaID {
1: TagID tag_id,
2: EdgeType edge_type,
}
struct Date {
1: i16 year;
2: byte month;
3: byte day;
}
struct Time {
1: byte hour;
2: byte minute;
3: byte sec;
4: i32 microsec;
}
struct DateTime {
1: i16 year;
2: byte month;
3: byte day;
4: byte hour;
5: byte minute;
6: byte sec;
7: i32 microsec;
}
enum NullType {
__NULL__ = 0,
NaN = 1,
BAD_DATA = 2,
BAD_TYPE = 3,
ERR_OVERFLOW = 4,
UNKNOWN_PROP = 5,
DIV_BY_ZERO = 6,
OUT_OF_RANGE = 7,
}
union Value {
1: NullType nVal;
2: bool bVal;
3: i64 iVal;
4: double fVal;
5: binary sVal;
6: Date dVal;
7: Time tVal;
8: DateTime dtVal;
9: Vertex vVal;
10: Edge eVal;
11: Path pVal;
12: NList lVal;
13: NMap mVal;
14: NSet uVal;
15: DataSet gVal;
16: Geography ggVal;
17: Duration duVal;
}
struct NList {
1: list<Value> values;
}
struct NMap {
1: map<binary, Value> kvs;
}
struct NSet {
1: set<Value> values;
}
struct Row {
1: list<Value> values;
}
struct DataSet {
1: list<binary> column_names;
2: list<Row> rows;
}
struct Coordinate {
1: double x;
2: double y;
}
struct Point {
1: Coordinate coord;
}
struct LineString {
1: list<Coordinate> coordList;
}
struct Polygon {
1: list<list<Coordinate>> coordListList;
}
union Geography {
1: Point ptVal;
2: LineString lsVal;
3: Polygon pgVal;
}
struct Tag {
1: binary name,
2: map<binary, Value> props,
}
struct Vertex {
1: Value vid,
2: list<Tag> tags,
}
struct Edge {
1: Value src,
2: Value dst,
3: EdgeType type,
4: binary name,
5: EdgeRanking ranking,
6: map<binary, Value> props,
}
struct Step {
1: Vertex dst,
2: EdgeType type,
3: binary name,
4: EdgeRanking ranking,
5: map<binary, Value> props,
}
struct Path {
1: Vertex src,
2: list<Step> steps;
}
struct Duration {
1: i64 seconds;
2: i32 microseconds;
3: i32 months;
}
struct HostAddr {
1: string host,
2: Port port,
}
enum ErrorCode {
SUCCEEDED = 0,
E_DISCONNECTED = -1,
E_FAIL_TO_CONNECT = -2,
E_RPC_FAILURE = -3,
E_LEADER_CHANGED = -4,
E_SPACE_NOT_FOUND = -5,
E_TAG_NOT_FOUND = -6,
E_EDGE_NOT_FOUND = -7,
E_INDEX_NOT_FOUND = -8,
E_EDGE_PROP_NOT_FOUND = -9,
E_TAG_PROP_NOT_FOUND = -10,
E_ROLE_NOT_FOUND = -11,
E_CONFIG_NOT_FOUND = -12,
E_USER_NOT_FOUND = -18,
E_KEY_NOT_FOUND = -17,
E_BAD_USERNAME_PASSWORD = -1001,
E_SESSION_INVALID = -1002,
E_SESSION_TIMEOUT = -1003,
E_SYNTAX_ERROR = -1004,
E_EXECUTION_ERROR = -1005,
E_STATEMENT_EMPTY = -1006,
E_BAD_PERMISSION = -1008,
E_SEMANTIC_ERROR = -1009,
E_TOO_MANY_CONNECTIONS = -1010,
E_PARTIAL_SUCCEEDED = -1011,
E_UNKNOWN = -8000,
}