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

20 lines
338 B
C++
Raw Normal View History

2011-11-29 18:53:44 +00:00
#pragma once
2017-01-03 01:42:17 +00:00
#include <DB/IO/ReadBufferFromMemory.h>
2011-11-29 18:53:44 +00:00
namespace DB
{
2017-01-03 01:42:17 +00:00
/** Allows to read from std::string-like object.
2011-11-29 18:53:44 +00:00
*/
2017-01-03 01:42:17 +00:00
class ReadBufferFromString : public ReadBufferFromMemory
2011-11-29 18:53:44 +00:00
{
public:
2017-01-03 01:42:17 +00:00
/// std::string or mysqlxx::Value
2011-11-29 18:53:44 +00:00
template <typename S>
2017-01-03 01:42:17 +00:00
ReadBufferFromString(const S & s) : ReadBufferFromMemory(s.data(), s.size()) {}
2011-11-29 18:53:44 +00:00
};
}