Class abstractsql_data_provider

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class ral::io::abstractsql_data_provider : public ral::io::data_provider

serves as base abstract class for all sql providers can generate a series of resultsets from databases that are provided when it goes out of scope it will close any resultset it opened this last point is debatable in terms of if this is the desired functionality

Subclassed by ral::io::mysql_data_provider, ral::io::postgresql_data_provider, ral::io::sqlite_data_provider

Public Functions

abstractsql_data_provider(const sql_info &sql, size_t total_number_of_nodes, size_t self_node_idx)
virtual ~abstractsql_data_provider()
virtual std::vector<data_handle> get_some(std::size_t batch_count, bool = true) override

Get batch_count batches from the sql database using while has_next() and next()

virtual void close_file_handles() override

Closes currently open set of file handles maintained by the provider

inline void set_column_indices(std::vector<int> column_indices)

Set the column indices (aka projections) that will use to select the table

bool set_predicate_pushdown(const std::string &queryString)

Protected Functions

virtual std::unique_ptr<ral::parser::node_transformer> get_predicate_transformer() const = 0
std::string build_select_query(size_t batch_index) const

Protected Attributes

sql_info sql
std::vector<int> column_indices
std::vector<std::string> column_names
std::vector<std::string> column_types
size_t total_number_of_nodes
size_t self_node_idx
std::string where