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

20 lines
342 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::String
template <typename S>
ReadBufferFromString(const S & s) : ReadBuffer(const_cast<char *>(s.data()), s.size(), 0) {}
};
}