◆ MemoryStream() [1/3]
| duckdb::MemoryStream::MemoryStream |
( |
Allocator & |
allocator, |
|
|
idx_t |
capacity = DEFAULT_INITIAL_CAPACITY |
|
) |
| |
|
explicit |
Create a new owning MemoryStream with an internal backing buffer with the specified capacity. The stream will own the backing buffer, resize it when needed and free its memory when the stream is destroyed
◆ MemoryStream() [2/3]
| duckdb::MemoryStream::MemoryStream |
( |
idx_t |
capacity = DEFAULT_INITIAL_CAPACITY | ) |
|
|
explicit |
Create a new owning MemoryStream with an internal backing buffer with the specified capacity. The stream will own the backing buffer, resize it when needed and free its memory when the stream is destroyed
◆ MemoryStream() [3/3]
| duckdb::MemoryStream::MemoryStream |
( |
data_ptr_t |
buffer, |
|
|
idx_t |
capacity |
|
) |
| |
|
explicit |
Create a new non-owning MemoryStream over the specified external buffer and capacity. The stream will not take ownership of the backing buffer, will not attempt to resize it and will not free the memory when the stream is destroyed
◆ WriteData()
| void duckdb::MemoryStream::WriteData |
( |
const_data_ptr_t |
buffer, |
|
|
idx_t |
write_size |
|
) |
| |
|
overridevirtual |
Write data to the stream. Throws if the write would exceed the capacity of the stream and the backing buffer is not owned by the stream
Implements duckdb::WriteStream.
◆ ReadData() [1/2]
| void duckdb::MemoryStream::ReadData |
( |
data_ptr_t |
buffer, |
|
|
idx_t |
read_size |
|
) |
| |
|
overridevirtual |
Read data from the stream. Throws if the read would exceed the capacity of the stream
Implements duckdb::ReadStream.
◆ ReadData() [2/2]
◆ Release()
| void duckdb::MemoryStream::Release |
( |
| ) |
|
Release ownership of the backing buffer and turn a owning stream into a non-owning one. The stream will no longer be responsible for freeing the data. The stream will also no longer attempt to automatically resize the buffer when the capacity is reached.
The documentation for this class was generated from the following file: