2
* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License as
6
* published by the Free Software Foundation; version 2 of the
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22
#include "wb_config.h"
23
#include "db_rev_eng_be.h"
24
#include "base/string_utilities.h"
26
void Db_rev_eng::grtm(bec::GRTManager *grtm)
28
Db_plugin::grtm(grtm);
29
Sql_import::grtm(grtm);
33
std::string Db_rev_eng::task_desc()
35
return "Reverse engineer database";
39
db_CatalogRef Db_rev_eng::target_catalog()
41
return Db_plugin::model_catalog();
45
std::string Db_rev_eng::sql_script()
47
std::string sql_script;
48
Db_plugin::dump_ddl(sql_script);
53
void Db_rev_eng::parse_sql_script(SqlFacade::Ref sql_parser, db_CatalogRef &catalog, const std::string &sql_script, grt::DictRef &options)
55
grt::AutoUndo undo(_grtm->get_grt());
56
sql_parser->parseSqlScriptStringEx(catalog, sql_script, options);
57
undo.end(_("Reverse Engineer Database"));