ClickHouse/dbms/include/DB/IO/ReadBufferFromString.h
2017-01-03 04:42:17 +03:00

20 lines
338 B
C++

#pragma once
#include <DB/IO/ReadBufferFromMemory.h>
namespace DB
{
/** Allows to read from std::string-like object.
*/
class ReadBufferFromString : public ReadBufferFromMemory
{
public:
/// std::string or mysqlxx::Value
template <typename S>
ReadBufferFromString(const S & s) : ReadBufferFromMemory(s.data(), s.size()) {}
};
}