|
KiCad PCB EDA Suite
|
Hands rows from a worker job to a caller's sink and gives the caller the column labels. More...
#include <db_backend_support.h>
Public Member Functions | |
| DB_READ_DELIVERY (std::vector< std::string > &aLabels, const DB_ROW_SINK &aSink) | |
| DB_READ_DELIVERY (const DB_READ_DELIVERY &)=delete | |
| DB_READ_DELIVERY & | operator= (const DB_READ_DELIVERY &)=delete |
| const std::shared_ptr< std::vector< std::string > > & | Labels () const |
| The labels the job fills in. | |
| const DB_ROW_SINK * | Sink () const |
| The sink to pass to the worker call. | |
| void | Finish () |
| Copies the labels out if no row did, after the call returned a result. | |
| bool | SinkThrew () const |
| True if the caller's sink threw. | |
Static Public Member Functions | |
| static std::string | SinkFailureMessage () |
| The message for a read the caller's sink gave up on. | |
Private Attributes | |
| std::vector< std::string > & | m_labels |
| const DB_ROW_SINK & | m_sink |
| std::shared_ptr< std::vector< std::string > > | m_jobLabels |
| DB_ROW_SINK | m_deliver |
| bool | m_labelsCopied = false |
| bool | m_sinkThrew = false |
Hands rows from a worker job to a caller's sink and gives the caller the column labels.
The job fills Labels() before its first row, so they are copied out when that row arrives or, for a read that returned no rows, by Finish().
Definition at line 72 of file db_backend_support.h.
| DB_READ_DELIVERY::DB_READ_DELIVERY | ( | std::vector< std::string > & | aLabels, |
| const DB_ROW_SINK & | aSink ) |
Definition at line 56 of file db_backend_support.cpp.
References m_deliver, m_jobLabels, m_labels, m_labelsCopied, m_sink, and m_sinkThrew.
Referenced by DB_READ_DELIVERY(), and operator=().
|
delete |
References DB_READ_DELIVERY().
| void DB_READ_DELIVERY::Finish | ( | ) |
Copies the labels out if no row did, after the call returned a result.
Definition at line 82 of file db_backend_support.cpp.
References m_jobLabels, m_labels, and m_labelsCopied.
Referenced by ACE_BACKEND::readPass(), and SQLITE_BACKEND::ReadTable().
|
inline |
The labels the job fills in.
Definition at line 81 of file db_backend_support.h.
References m_jobLabels.
Referenced by ACE_BACKEND::readPass(), and SQLITE_BACKEND::ReadTable().
|
delete |
References DB_READ_DELIVERY().
|
inline |
The sink to pass to the worker call.
Definition at line 84 of file db_backend_support.h.
References m_deliver.
Referenced by ACE_BACKEND::readPass(), and SQLITE_BACKEND::ReadTable().
|
static |
The message for a read the caller's sink gave up on.
Definition at line 89 of file db_backend_support.cpp.
Referenced by ACE_BACKEND::readPass(), and SQLITE_BACKEND::ReadTable().
|
inline |
True if the caller's sink threw.
Definition at line 90 of file db_backend_support.h.
References m_sinkThrew.
Referenced by ACE_BACKEND::readPass(), and SQLITE_BACKEND::ReadTable().
|
private |
Definition at line 99 of file db_backend_support.h.
Referenced by DB_READ_DELIVERY(), and Sink().
|
private |
Definition at line 98 of file db_backend_support.h.
Referenced by DB_READ_DELIVERY(), Finish(), and Labels().
|
private |
Definition at line 96 of file db_backend_support.h.
Referenced by DB_READ_DELIVERY(), and Finish().
|
private |
Definition at line 100 of file db_backend_support.h.
Referenced by DB_READ_DELIVERY(), and Finish().
|
private |
Definition at line 97 of file db_backend_support.h.
Referenced by DB_READ_DELIVERY().
|
private |
Definition at line 101 of file db_backend_support.h.
Referenced by DB_READ_DELIVERY(), and SinkThrew().