|
| enum class | Type { SIMPLE
, BATCHED
} |
|
|
Type | type |
|
weak_ptr< ClientContext > | context |
| | This is weak to avoid a cyclical reference.
|
|
idx_t | total_buffer_size |
| | The maximum amount of memory we should keep buffered.
|
|
mutex | glock |
| | Protect against populate/fetch race condition.
|
◆ Type
| enum class duckdb::BufferedData::Type |
|
strongprotected |
41176{ SIMPLE, BATCHED };
◆ BufferedData()
| duckdb::BufferedData::BufferedData |
( |
Type | type, |
|
|
ClientContext & | context ) |
262630 : type(type),
context(context_p.shared_from_this()) {
262631 auto &config = ClientConfig::GetConfig(context_p);
262633}
idx_t total_buffer_size
The maximum amount of memory we should keep buffered.
Definition duckdb.hpp:41223
weak_ptr< ClientContext > context
This is weak to avoid a cyclical reference.
Definition duckdb.hpp:41221
◆ ~BufferedData()
| duckdb::BufferedData::~BufferedData |
( |
| ) |
|
|
virtual |
◆ ReplenishBuffer()
262638 {
262640 if (!cc) {
262641 return StreamExecutionResult::EXECUTION_CANCELLED;
262642 }
262643
262644 StreamExecutionResult execution_result;
262645 while (!StreamQueryResult::IsChunkReady(execution_result = ExecuteTaskInternal(result, context_lock))) {
262646 if (execution_result == StreamExecutionResult::BLOCKED) {
262647 UnblockSinks();
262648 cc->WaitForTask(context_lock, result);
262649 }
262650 }
262651 if (result.HasError()) {
262652 Close();
262653 }
262654 return execution_result;
262655}
◆ GetContext()
◆ Closed()
| bool duckdb::BufferedData::Closed |
( |
| ) |
const |
|
inline |
41190 {
41192 return true;
41193 }
41195 return c == nullptr;
41196 }
◆ Close()
| void duckdb::BufferedData::Close |
( |
| ) |
|
|
inline |
◆ Cast() [1/2]
template<class TARGET>
| TARGET & duckdb::BufferedData::Cast |
( |
| ) |
|
|
inline |
41203 {
41204 if (TARGET::TYPE != type) {
41205 throw InternalException("Failed to cast buffered data to type - buffered data type mismatch");
41206 }
41207 return reinterpret_cast<TARGET &>(*this);
41208 }
◆ Cast() [2/2]
template<class TARGET>
| const TARGET & duckdb::BufferedData::Cast |
( |
| ) |
const |
|
inline |
41211 {
41212 if (TARGET::TYPE != type) {
41213 throw InternalException("Failed to cast buffered data to type - buffered data type mismatch");
41214 }
41215 return reinterpret_cast<const TARGET &>(*this);
41216 }
The documentation for this class was generated from the following files: