ClickHouse/dbms/include/DB/IO/ReadBufferFromString.h

20 lines
341 B
C++
Raw Normal View History

2011-11-29 18:53:44 +00:00
#pragma once
#include <DB/IO/ReadBuffer.h>
namespace DB
{
/** Позволяет читать из строки.
*/
class ReadBufferFromString : public ReadBuffer
{
public:
/// std::string или mysqlxx::Value
2011-11-29 18:53:44 +00:00
template <typename S>
ReadBufferFromString(const S & s) : ReadBuffer(const_cast<char *>(s.data()), s.size(), 0) {}
};
}