JC_
JC_

Reputation: 45

What are best possible way to represent a tabular data in flatbuffer

I have tabular data (header, data rows/columns). One can assume it to be in csv format for representation purpose.

I am new to Flatbuffers so want to know best possible way to represent tabular data in Flatbuffers.

Upvotes: 0

Views: 336

Answers (1)

Aardappel
Aardappel

Reputation: 6074

Something like this:

table Row {
  col1:int;  // These can each be their own data type.
  col2:string;
  ..
  // Fixed number of columns.
}

table Root {
  rows:[Row];  // vector of rows, variable length.
}

root_type Root;

Note that in this case FlatBuffers' use of table is very different from a database table.

Upvotes: 2

Related Questions