xale-db 1.0
minimal SQL engine, written in c++
Loading...
Searching...
No Matches
Xale::Engine::QueryEngine Class Reference

#include <QueryEngine.h>

Collaboration diagram for Xale::Engine::QueryEngine:
Collaboration graph

Public Member Functions

 QueryEngine ()=default
 QueryEngine (Xale::Query::IParser *parser, Xale::Execution::IExecutor *executor)
 Constructor of the XaleDB SQL QueryEngine.
bool run (std::string sqlQuery)
 Run the given string query.
std::unique_ptr< Xale::DataStructure::ResultSetgetResults ()
 Get the last runned query results.
std::string getResultsToString ()
 Get the last runned query results as a formatted string.

Constructor & Destructor Documentation

◆ QueryEngine() [1/2]

Xale::Engine::QueryEngine::QueryEngine ( )
default

◆ QueryEngine() [2/2]

Xale::Engine::QueryEngine::QueryEngine ( Xale::Query::IParser * parser,
Xale::Execution::IExecutor * executor )

Constructor of the XaleDB SQL QueryEngine.

Parameters
parsera SQL string parser
executora SQL statement executor

Member Function Documentation

◆ getResults()

std::unique_ptr< Xale::DataStructure::ResultSet > Xale::Engine::QueryEngine::getResults ( )

Get the last runned query results.

Returns
a ResultSet of the last runned query

◆ getResultsToString()

std::string Xale::Engine::QueryEngine::getResultsToString ( )

Get the last runned query results as a formatted string.

Returns
a string representing the last runned query results

◆ run()

bool Xale::Engine::QueryEngine::run ( std::string sqlQuery)

Run the given string query.

Parameters
sqlQueryThe SQL string query
Returns
True if the execution run well, False otherwise

The documentation for this class was generated from the following files: