public static Offset <RecordBatch> CreateRecordBatch(FlatBufferBuilder builder, long length = 0, VectorOffset nodesOffset = default(VectorOffset), VectorOffset buffersOffset = default(VectorOffset)) { builder.StartObject(3); RecordBatch.AddLength(builder, length); RecordBatch.AddBuffers(builder, buffersOffset); RecordBatch.AddNodes(builder, nodesOffset); return(RecordBatch.EndRecordBatch(builder)); }
/// <summary> /// Creates a list of <see cref="FB.Buffer"/> /// </summary> public static List <FB.Buffer> GetBuffers(this FB.RecordBatch root) { int length = root.BuffersLength; var result = new List <FB.Buffer>(length); for (int i = 0; i < length; i++) { FB.Buffer element = root.Buffers(i).GetValueOrDefault(); result.Add(element); } return(result); }
/// <summary> /// Creates a list of <see cref="FB.FieldNode"/> /// </summary> public static List <FB.FieldNode> GetNodes(this FB.RecordBatch root) { int length = root.NodesLength; var result = new List <FB.FieldNode>(length); for (int i = 0; i < length; i++) { FB.FieldNode element = root.Nodes(i).GetValueOrDefault(); result.Add(element); } return(result); }
internal RecordBatch(FB.Message fbMessage) : base(fbMessage.BodyLength, fbMessage.HeaderType, fbMessage.Version) { FB.RecordBatch fb = fbMessage.Header <FB.RecordBatch>().GetValueOrDefault(); _nodes = fb.GetNodes(); _buffers = fb.GetBuffers(); }
public static RecordBatch GetRootAsRecordBatch(ByteBuffer _bb, RecordBatch obj) { return(obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }