15 #include "eckit/io/DataHandle.h"
24 using namespace eckit;
32 Select::Select(
const std::string& selectStatement,
bool manageOwnBuffer) :
33 selectStatement_(selectStatement),
34 session_(
std::unique_ptr<
eckit::sql::SQLOutput>(new sql::SQLSelectOutput(manageOwnBuffer)),
35 std::unique_ptr<
eckit::sql::SQLOutputConfig>(new
odc::sql::SQLOutputConfig)),
41 Select(selectStatement, true) {
44 eckit::sql::SQLDatabase& db(
session_.currentDatabase());
49 Select::Select(
const std::string& selectStatement,
const std::string& path,
bool ) :
54 eckit::sql::SQLDatabase& db(
session_.currentDatabase());
58 Select::Select(
const std::string &selectStatement,
const char *path,
bool manageOwnBuffer) :
59 Select(selectStatement,
std::string(path), manageOwnBuffer) {}
static eckit::DataHandle * openForRead(const std::string &)
eckit::sql::SQLDatabase & database()
std::string selectStatement_
std::unique_ptr< eckit::DataHandle > ownDH_
Select(const std::string &selectStatement="", bool manageOwnBuffer=true)
eckit::sql::SQLSession session_
IteratorProxy< SelectIterator, Select, const double > iterator
SelectIterator * createSelectIterator(const std::string &)