| 42 | namespace schema { |
| 43 | |
| 44 | static inline SchemaElement NewPrimitive(const std::string& name, |
| 45 | FieldRepetitionType::type repetition, |
| 46 | Type::type type, int field_id = -1) { |
| 47 | SchemaElement result; |
| 48 | result.__set_name(name); |
| 49 | result.__set_repetition_type(repetition); |
| 50 | result.__set_type(static_cast<format::Type::type>(type)); |
| 51 | if (field_id >= 0) { |
| 52 | result.__set_field_id(field_id); |
| 53 | } |
| 54 | return result; |
| 55 | } |
| 56 | |
| 57 | static inline SchemaElement NewGroup(const std::string& name, |
| 58 | FieldRepetitionType::type repetition, |
no test coverage detected