OmniSciDB
94e8789169
|
#include <ParserWrapper.h>
Public Types | |
enum | DMLType : int { DMLType::Insert = 0, DMLType::Delete, DMLType::Update, DMLType::Upsert, DMLType::NotDML } |
enum | ExplainType { ExplainType::None, ExplainType::IR, ExplainType::OptimizedIR, ExplainType::Calcite, ExplainType::ExecutionPlan, ExplainType::Other } |
enum | QueryType { QueryType::Unknown, QueryType::Read, QueryType::Write, QueryType::SchemaRead, QueryType::SchemaWrite } |
Public Member Functions | |
ParserWrapper (std::string query_string) | |
std::string | process (std::string user, std::string passwd, std::string catalog, std::string sql_string, const bool legacy_syntax) |
virtual | ~ParserWrapper () |
DMLType | getDMLType () const |
ExplainInfo | getExplainInfo () const |
ExplainType | getExplainType () const |
QueryType | getQueryType () const |
bool | isUpdateDelete () const |
bool | isCalciteExplain () const |
bool | isPlanExplain () const |
bool | isSelectExplain () const |
bool | isIRExplain () const |
bool | isCalcitePathPermissable (bool read_only_mode=false) |
bool | isOtherExplain () const |
bool | isCalcitePermissableDml (bool read_only_mode) |
bool | isCalciteDdl () const |
Public Attributes | |
bool | is_ddl = false |
bool | is_update_dml = false |
bool | is_ctas = false |
bool | is_itas = false |
bool | is_copy = false |
bool | is_copy_to = false |
bool | is_optimize = false |
bool | is_validate = false |
std::string | actual_query |
Private Attributes | |
DMLType | dml_type_ = DMLType::NotDML |
ExplainType | explain_type_ = ExplainType::None |
QueryType | query_type_ = QueryType::Unknown |
bool | is_legacy_ddl_ = false |
bool | is_calcite_ddl_ = false |
Static Private Attributes | |
static const std::vector < std::string > | ddl_cmd |
static const std::vector < std::string > | update_dml_cmd |
static const std::string | explain_str = {"explain"} |
static const std::string | calcite_explain_str = {"explain calcite"} |
static const std::string | optimized_explain_str = {"explain optimized"} |
static const std::string | plan_explain_str = {"explain plan"} |
static const std::string | optimize_str = {"optimize"} |
static const std::string | validate_str = {"validate"} |
Definition at line 44 of file ParserWrapper.h.
|
strong |
Enumerator | |
---|---|
Insert | |
Delete | |
Update | |
Upsert | |
NotDML |
Definition at line 47 of file ParserWrapper.h.
|
strong |
Enumerator | |
---|---|
None | |
IR | |
OptimizedIR | |
Calcite | |
ExecutionPlan | |
Other |
Definition at line 49 of file ParserWrapper.h.
|
strong |
ParserWrapper::ParserWrapper | ( | std::string | query_string | ) |
Definition at line 64 of file ParserWrapper.cpp.
References g_enable_calcite_ddl_parser, g_enable_fsi, generate_TableFunctionsFactory_init::i, logger::IR, and update_dml_cmd.
|
virtual |
Definition at line 230 of file ParserWrapper.cpp.
|
inline |
Definition at line 73 of file ParserWrapper.h.
References dml_type_.
Referenced by isCalcitePermissableDml().
ExplainInfo ParserWrapper::getExplainInfo | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 99 of file ParserWrapper.h.
References explain_type_, is_calcite_ddl_, is_legacy_ddl_, is_optimize, is_validate, isCalcitePermissableDml(), and Other.
|
inline |
Definition at line 107 of file ParserWrapper.h.
References Delete, getDMLType(), is_update_dml, and Update.
Referenced by isCalcitePathPermissable().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 89 of file ParserWrapper.h.
References Calcite, ExecutionPlan, explain_type_, IR, and OptimizedIR.
Referenced by DBHandler::parse_to_ra().
|
inline |
std::string ParserWrapper::process | ( | std::string | user, |
std::string | passwd, | ||
std::string | catalog, | ||
std::string | sql_string, | ||
const bool | legacy_syntax | ||
) |
std::string ParserWrapper::actual_query |
Definition at line 71 of file ParserWrapper.h.
|
staticprivate |
Definition at line 125 of file ParserWrapper.h.
|
staticprivate |
Definition at line 122 of file ParserWrapper.h.
|
private |
Definition at line 118 of file ParserWrapper.h.
Referenced by getDMLType(), and isUpdateDelete().
|
staticprivate |
Definition at line 124 of file ParserWrapper.h.
|
private |
Definition at line 119 of file ParserWrapper.h.
Referenced by getExplainType(), isCalciteExplain(), isCalcitePathPermissable(), isIRExplain(), isOtherExplain(), isPlanExplain(), and isSelectExplain().
|
private |
Definition at line 132 of file ParserWrapper.h.
Referenced by isCalciteDdl(), and isCalcitePathPermissable().
bool ParserWrapper::is_copy = false |
Definition at line 67 of file ParserWrapper.h.
bool ParserWrapper::is_copy_to = false |
Definition at line 68 of file ParserWrapper.h.
bool ParserWrapper::is_ctas = false |
Definition at line 65 of file ParserWrapper.h.
bool ParserWrapper::is_ddl = false |
Definition at line 61 of file ParserWrapper.h.
bool ParserWrapper::is_itas = false |
Definition at line 66 of file ParserWrapper.h.
|
private |
Definition at line 131 of file ParserWrapper.h.
Referenced by isCalcitePathPermissable().
bool ParserWrapper::is_optimize = false |
Definition at line 69 of file ParserWrapper.h.
Referenced by isCalcitePathPermissable().
bool ParserWrapper::is_update_dml = false |
Definition at line 64 of file ParserWrapper.h.
Referenced by isCalcitePermissableDml().
bool ParserWrapper::is_validate = false |
Definition at line 70 of file ParserWrapper.h.
Referenced by isCalcitePathPermissable().
|
staticprivate |
Definition at line 128 of file ParserWrapper.h.
|
staticprivate |
Definition at line 126 of file ParserWrapper.h.
|
staticprivate |
Definition at line 127 of file ParserWrapper.h.
|
private |
Definition at line 120 of file ParserWrapper.h.
Referenced by getQueryType().
|
staticprivate |
Definition at line 123 of file ParserWrapper.h.
Referenced by ParserWrapper().
|
staticprivate |
Definition at line 129 of file ParserWrapper.h.