DictRef options; TEST_DATA_CONSTRUCTOR(mysql_sql_facade) : sql_facade(nullptr) { wbt = new WBTester; } END_TEST_DATA_CLASS TEST_MODULE(mysql_sql_facade, "SQL Parser FE (MySQL)"); // Creates the needed structure for the testing... TEST_FUNCTION(1) { sql_facade = NULL; wbt->create_new_document(); ensure_equals("loaded physycal model count", wbt->wb->get_document()->physicalModels().count(), 1U); options = DictRef(true); options.set("gen_fk_names_when_empty", IntegerRef(0)); rdbms = wbt->wb->get_document()->physicalModels().get(0)->rdbms(); sql_facade = SqlFacade::instance_for_rdbms(rdbms); ensure("failed to get sqlparser module", (NULL != sql_facade)); } // Pretty simple parsing sample TEST_FUNCTION(2) { ensure("failed to get sqlparser module", (NULL != sql_facade)); std::string schema_name; std::string table_name; SqlFacade::String_tuple_list columns;
DictRef options; END_TEST_DATA_CLASS TEST_MODULE(mysql_sql_facade, "SQL Parser FE (MySQL)"); // Creates the needed structure for the testing... TEST_FUNCTION(1) { sql_facade = NULL; wbt.create_new_document(); GRT *grt= wbt.grt; ensure_equals("loaded physycal model count", wbt.wb->get_document()->physicalModels().count(), 1U); options= DictRef(grt); options.set("gen_fk_names_when_empty", IntegerRef(0)); rdbms= wbt.wb->get_document()->physicalModels().get(0)->rdbms(); sql_facade= SqlFacade::instance_for_rdbms(rdbms); ensure("failed to get sqlparser module", (NULL != sql_facade)); } // Pretty simple parsing sample TEST_FUNCTION(2) { ensure("failed to get sqlparser module", (NULL != sql_facade)); std::string schema_name; std::string table_name;