File: sql_import_be.h

package info (click to toggle)
mysql-workbench 6.2.3%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 102,612 kB
  • ctags: 84,593
  • sloc: ansic: 804,682; cpp: 438,759; yacc: 59,129; python: 54,293; xml: 48,851; sql: 5,512; objc: 1,414; makefile: 505; sh: 455; java: 237; ruby: 6; perl: 5; php: 1
file content (44 lines) | stat: -rw-r--r-- 1,298 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef _SQL_IMPORT_BE_H_
#define _SQL_IMPORT_BE_H_

#include "grts/structs.db.h"
#include "grts/structs.workbench.h"

#include "grt/grt_manager.h"
#include "grtpp_undo_manager.h"
#include "db_mysql_public_interface.h"
#include "grtsqlparser/sql_facade.h"


class WBPLUGINDBMYSQLBE_PUBLIC_FUNC Sql_import
{
public:
  void grtm(bec::GRTManager *grtm);

  boost::function<grt::ValueRef (grt::GRT*)> get_task_slot();

  boost::function<grt::ValueRef (grt::GRT*)> get_autoplace_task_slot();
  
private:
  grt::StringRef parse_sql_script(grt::GRT *grt, db_CatalogRef catalog, const std::string &sql_script);
  virtual void parse_sql_script(SqlFacade::Ref sql_parser, db_CatalogRef &catalog, const std::string &sql_scrtipt, grt::DictRef &options);
  virtual db_CatalogRef target_catalog();

public:
  virtual std::string sql_script() { return _sql_script; }
  virtual void sql_script(const std::string &sql_script) { _sql_script= sql_script; }
  virtual void sql_script_codeset(const std::string &value) { _sql_script_codeset= value; }

  grt::ListRef<GrtObject> get_created_objects();
protected:
  
  grt::ValueRef autoplace_grt(grt::GRT *grt);
  
  grt::DictRef _options;
  
  workbench_DocumentRef _doc;
  std::string _sql_script;
  std::string _sql_script_codeset;
};

#endif /* _SQL_IMPORT_BE_H_ */