#pragma once #include #if USE_PROTOBUF #include #include #include namespace DB { class Block; class FormatSchemaInfo; /** Interface of stream, that allows to read data by rows. */ class ProtobufRowInputFormat : public IRowInputFormat { public: ProtobufRowInputFormat(ReadBuffer & in, Block header, Params params, const FormatSchemaInfo & info); ~ProtobufRowInputFormat() override; String getName() const override { return "ProtobufRowInputFormat"; } bool readRow(MutableColumns & columns, RowReadExtension & extra) override; bool allowSyncAfterError() const override; void syncAfterError() override; private: DataTypes data_types; ProtobufReader reader; }; } #endif