mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-21 17:20:50 +00:00
dbms: preparation [#METR-18603].
This commit is contained in:
parent
37ba429c1e
commit
1331e1fb42
@ -22,6 +22,8 @@ public:
|
||||
|
||||
void flush() override { ostr.next(); }
|
||||
|
||||
String getContentType() const override { return "application/octet-stream"; }
|
||||
|
||||
protected:
|
||||
WriteBuffer & ostr;
|
||||
const Block sample;
|
||||
|
@ -24,6 +24,8 @@ public:
|
||||
void setTotals(const Block & totals) override;
|
||||
void setExtremes(const Block & extremes) override;
|
||||
|
||||
String getContentType() const override { return row_output->getContentType(); }
|
||||
|
||||
private:
|
||||
RowOutputStreamPtr row_output;
|
||||
bool first_row;
|
||||
|
@ -42,6 +42,10 @@ public:
|
||||
virtual void setTotals(const Block & totals) {}
|
||||
virtual void setExtremes(const Block & extremes) {}
|
||||
|
||||
/** Выставлять такой Content-Type при отдаче по HTTP.
|
||||
*/
|
||||
virtual String getContentType() const { return "text/plain; charset=UTF-8"; }
|
||||
|
||||
virtual ~IBlockOutputStream() {}
|
||||
|
||||
/** Не давать изменить таблицу, пока жив поток блоков.
|
||||
|
@ -41,6 +41,9 @@ public:
|
||||
virtual void setTotals(const Block & totals) {}
|
||||
virtual void setExtremes(const Block & extremes) {}
|
||||
|
||||
/** Выставлять такой Content-Type при отдаче по HTTP. */
|
||||
virtual String getContentType() const { return "text/plain; charset=UTF-8"; }
|
||||
|
||||
virtual ~IRowOutputStream() {}
|
||||
};
|
||||
|
||||
|
@ -42,6 +42,8 @@ public:
|
||||
void setTotals(const Block & totals_) override { totals = totals_; }
|
||||
void setExtremes(const Block & extremes_) override { extremes = extremes_; }
|
||||
|
||||
String getContentType() const override { return "application/json; charset=UTF-8"; }
|
||||
|
||||
protected:
|
||||
|
||||
void writeRowsBeforeLimitAtLeast();
|
||||
|
@ -30,6 +30,8 @@ public:
|
||||
|
||||
static void writeData(const IDataType & type, const ColumnPtr & column, WriteBuffer & ostr, size_t offset, size_t limit);
|
||||
|
||||
String getContentType() const override { return "application/octet-stream"; }
|
||||
|
||||
private:
|
||||
WriteBuffer & ostr;
|
||||
UInt64 client_revision;
|
||||
|
Loading…
Reference in New Issue
Block a user