Files
flatbuffers/tests/key_field/key_field_sample.fbs
Wen Sun eb1abb51ea Add support for using array of scalar as key field in Cpp (#7623)
* add support for using array of scalar as key field

* update cmakelist and test.cpp to include the tests

* update bazel rule

* address comments

* clang format

* delete comment

* delete comment

* address the rest of the commnets

* address comments

* update naming in test file

* format build file

* buildifier

* make keycomparelessthan call keycomparewithvalue

* update to use flatbuffer array instead of raw pointer

* clang

* format

* revert format

* revert format

* update

* run generate_code.py

* run code generator

* revert changes by generate_code.py

* fist run make flatc and then run generate_code.py

Co-authored-by: Wen Sun <sunwen@google.com>
2022-11-18 11:04:46 -08:00

22 lines
314 B
Plaintext

namespace keyfield.sample;
struct Baz {
a: [uint8:4] (key); // A fixed-sized array of uint8 as a Key
b: uint8 ;
}
struct Bar {
a: [float:3] (key); // A fixed-sized array of float as a Key
b: uint8;
}
table FooTable {
a: int;
b: int;
c: string (key);
d: [Baz];
e: [Bar];
}
root_type FooTable;