File Information
Library: Data/SQLite
Package: SQLite
Header: Poco/Data/SQLite/Extractor.h
Description
Extracts and converts data values form the result row returned by SQLite. If NULL is received, the incoming val value is not changed and false is returned
Inheritance
Direct Base Classes: Poco::Data::AbstractExtractor
All Base Classes: Poco::Data::AbstractExtractor
Member Summary
Types
NullIndVec
typedef std::vector < std::pair < bool, bool > > NullIndVec;
Type for null indicators container.
Constructors
Extractor
Extractor(
sqlite3_stmt * pStmt
);
Creates the Extractor.
Destructor
~Extractor
~Extractor();
Destroys the Extractor.
Member Functions
extract
bool extract(
std::size_t pos,
Poco::Int8 & val
);
Extracts an Int8.
See also: Poco::Data::AbstractExtractor::extract()
extract
bool extract(
std::size_t pos,
Poco::UInt8 & val
);
Extracts an UInt8.
See also: Poco::Data::AbstractExtractor::extract()
extract
bool extract(
std::size_t pos,
Poco::Int16 & val
);
Extracts an Int16.
See also: Poco::Data::AbstractExtractor::extract()
extract
bool extract(
std::size_t pos,
Poco::UInt16 & val
);
Extracts an UInt16.
See also: Poco::Data::AbstractExtractor::extract()
extract
bool extract(
std::size_t pos,
Poco::Int32 & val
);
Extracts an Int32.
See also: Poco::Data::AbstractExtractor::extract()
extract
bool extract(
std::size_t pos,
Poco::UInt32 & val
);
Extracts an UInt32.
See also: Poco::Data::AbstractExtractor::extract()
extract
bool extract(
std::size_t pos,
Poco::Int64 & val
);
Extracts an Int64.
See also: Poco::Data::AbstractExtractor::extract()
extract
bool extract(
std::size_t pos,
Poco::UInt64 & val
);
Extracts an UInt64.
See also: Poco::Data::AbstractExtractor::extract()
extract
bool extract(
std::size_t pos,
long & val
);
Extracts a long.
See also: Poco::Data::AbstractExtractor::extract()
extract
bool extract(
std::size_t pos,
unsigned long & val
);
Extracts an unsigned long.
See also: Poco::Data::AbstractExtractor::extract()
extract
bool extract(
std::size_t pos,
bool & val
);
Extracts a boolean.
See also: Poco::Data::AbstractExtractor::extract()
extract
bool extract(
std::size_t pos,
float & val
);
Extracts a float.
See also: Poco::Data::AbstractExtractor::extract()
extract
bool extract(
std::size_t pos,
double & val
);
Extracts a double.
See also: Poco::Data::AbstractExtractor::extract()
extract
bool extract(
std::size_t pos,
char & val
);
Extracts a single character.
See also: Poco::Data::AbstractExtractor::extract()
extract
bool extract(
std::size_t pos,
std::string & val
);
Extracts a string.
See also: Poco::Data::AbstractExtractor::extract()
extract
bool extract(
std::size_t pos,
Poco::Data::BLOB & val
);
Extracts a BLOB.
extract
bool extract(
std::size_t pos,
Poco::Data::CLOB & val
);
Extracts a CLOB.
extract
bool extract(
std::size_t pos,
Poco::Data::Date & val
);
Extracts a Date.
extract
bool extract(
std::size_t pos,
Poco::Data::Time & val
);
Extracts a Time.
extract
bool extract(
std::size_t pos,
Poco::DateTime & val
);
Extracts a DateTime.
extract
bool extract(
std::size_t pos,
Poco::UUID & val
);
Extracts a Time.
extract
bool extract(
std::size_t pos,
Poco::Any & val
);
Extracts an Any.
extract
bool extract(
std::size_t pos,
Poco::DynamicAny & val
);
Extracts a DynamicAny.
isNull
bool isNull(
std::size_t pos,
std::size_t row = POCO_DATA_INVALID_ROW
);
Returns true if the current row value at pos column is null. Because of the loss of information about null-ness of the underlying database values due to the nature of SQLite engine, (once null value is converted to default value, SQLite API treats it as non-null), a null indicator container member variable is used to cache the indicators of the underlying nulls thus rendering this function idempotent. The container is a vector of [bool, bool] pairs. The vector index corresponds to the column position, the first bool value in the pair is true if the null indicator has been set and the second bool value in the pair is true if the column is actually null. The row argument, needed for connectors with bulk capabilities, is ignored in this implementation.
See also: Poco::Data::AbstractExtractor::isNull()
reset
void reset();
Clears the cached nulls indicator vector.
See also: Poco::Data::AbstractExtractor::reset()