#include "stdafx.h"

#include "grt/grt_dispatcher.h"
#include "mysql_routinegroup_editor.h"

/**
 * @file  mysql_routinegroup_editor.cpp
 * @brief 
 */

MySQLRoutineGroupEditorBE::MySQLRoutineGroupEditorBE(bec::GRTManager *grtm, const db_mysql_RoutineGroupRef &group, const db_mgmt_RdbmsRef &rdbms)
  : bec::RoutineGroupEditorBE(grtm, group, rdbms)
{
}

std::string MySQLRoutineGroupEditorBE::get_procedure_body()
{
  return strfmt("CREATE PROCEDURE `%s`.`proc`()\nBEGIN\n  \nEND //\n\n",
    get_schema()->name().c_str());
}

std::string MySQLRoutineGroupEditorBE::get_function_body()
{
  return strfmt("CREATE FUNCTION `%s`.`func`() RETURNS INT\nBEGIN\n  \nEND //\n\n",
    get_schema()->name().c_str());
}

