Thrift binary encoding and decoding of NebulaGraph data types.
This module handles the Value union, DataSet, Row, Vertex, Edge,
Path, and all other types defined in priv/thrift/common.thrift.
Value union field IDs
The Value union in the Thrift IDL maps to these field IDs:
| Field | ID | Elixir type |
|---|---|---|
| nVal | 1 | NullType (i32) |
| bVal | 2 | bool |
| iVal | 3 | i64 |
| fVal | 4 | double |
| sVal | 5 | binary |
| dVal | 6 | Date struct |
| tVal | 7 | Time struct |
| dtVal | 8 | DateTime struct |
| vVal | 9 | Vertex struct |
| eVal | 10 | Edge struct |
| pVal | 11 | Path struct |
| lVal | 12 | NList struct |
| mVal | 13 | NMap struct |
| uVal | 14 | NSet struct |
| gVal | 15 | DataSet struct |
| ggVal | 16 | Geography union |
| duVal | 17 | Duration struct |
Summary
Functions
Decodes a Thrift DataSet struct from binary.
Decodes a single Row struct. Returns {list_of_raw_values, rest}.
Decodes a Value union struct from binary.
Encodes an Elixir value as a Thrift Value union struct.
Functions
Decodes a Thrift DataSet struct from binary.
Returns {dataset_map, rest} where dataset_map has:
:column_names— list of binary column names:rows— list of decoded row value lists
Decodes a single Row struct. Returns {list_of_raw_values, rest}.
Each element in the list is a raw tagged value map as produced by
decode_value/1. NebulaGraphEx.Value.decode/1 converts these to native
Elixir types.
Decodes a Value union struct from binary.
Returns {{tag, value}, rest} where tag is one of:
:null, :bool, :integer, :float, :string,
:date, :time, :datetime, :vertex, :edge, :path,
:list, :map, :set, :dataset, :geography, :duration.
Encodes an Elixir value as a Thrift Value union struct.
Supported types: