| 1 | #pragma once | 
|---|---|
| 2 | |
| 3 | #include <IO/ReadBufferFromMemory.h> | 
| 4 | |
| 5 | |
| 6 | namespace DB | 
| 7 | { | 
| 8 | |
| 9 | /** Allows to read from std::string-like object. | 
| 10 | */ | 
| 11 | class ReadBufferFromString : public ReadBufferFromMemory | 
| 12 | { | 
| 13 | public: | 
| 14 | /// std::string or something similar | 
| 15 | template <typename S> | 
| 16 | ReadBufferFromString(const S & s) : ReadBufferFromMemory(s.data(), s.size()) {} | 
| 17 | }; | 
| 18 | |
| 19 | } | 
| 20 | 
