File: wb_overview_physical_schema.h

package info (click to toggle)
mysql-workbench 6.3.8%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 113,932 kB
  • ctags: 87,814
  • sloc: ansic: 955,521; cpp: 427,465; python: 59,728; yacc: 59,129; xml: 54,204; sql: 7,091; objc: 965; makefile: 638; sh: 613; java: 237; perl: 30; ruby: 6; php: 1
file content (86 lines) | stat: -rw-r--r-- 2,831 bytes parent folder | download | duplicates (3)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#ifndef _WB_OVERVIEW_PHYSICAL_SCHEMA_H_
#define _WB_OVERVIEW_PHYSICAL_SCHEMA_H_

#include "workbench/wb_overview.h"

namespace wb { namespace internal {

  class PhysicalSchemaContentNode;
  class SchemaObjectNode;

  class PhysicalSchemaNode : public OverviewBE::ContainerNode
  {
  public:
    virtual void init();
  protected:
    bool _is_routine_group_enabled;
    
  public:
    PhysicalSchemaNode(db_SchemaRef schema);
    virtual bool is_pasteable(bec::Clipboard *clip);
    virtual void paste_object(WBContext *wb, bec::Clipboard *clip);
    virtual bool is_deletable();
    virtual void delete_object(WBContext *wb);
    virtual bool is_renameable();
    virtual bool rename(WBContext *wb, const std::string &name);
    virtual bool activate(WBContext *wb);
    virtual void focus(OverviewBE *sender);
    virtual void refresh();

  public:
    virtual bool add_new_db_table(WBContext *wb);
    virtual bool add_new_db_view(WBContext *wb);
    virtual bool add_new_db_routine_group(WBContext *wb);
    virtual bool add_new_db_routine(WBContext *wb);
    
    virtual SchemaObjectNode * create_table_node(const db_DatabaseObjectRef &dbobject);
    virtual SchemaObjectNode * create_view_node(const db_DatabaseObjectRef &dbobject);
    virtual SchemaObjectNode * create_routine_node(const db_DatabaseObjectRef &dbobject);
    virtual SchemaObjectNode * create_routine_group_node(const db_DatabaseObjectRef &dbobject);
  };

  class SchemaObjectNode : public OverviewBE::ObjectNode
  {
    SchemaObjectNode(const SchemaObjectNode &copy) : OverviewBE::ObjectNode(copy) {}
  public:
    SchemaObjectNode(const db_DatabaseObjectRef &dbobject);
    virtual void delete_object(WBContext *wb);
    virtual bool is_deletable();
    virtual bool is_renameable();
    virtual void copy_object(WBContext *wb, bec::Clipboard *clip);
    virtual bool is_copyable();
  };

  class SchemaTableNode : public SchemaObjectNode
  {
  public:
    SchemaTableNode(const db_DatabaseObjectRef &dbobject) : SchemaObjectNode(dbobject) {}
    virtual std::string get_detail(int field);
  };

  class SchemaViewNode : public SchemaObjectNode
  {
  public:
    SchemaViewNode(const db_DatabaseObjectRef &dbobject) : SchemaObjectNode(dbobject) {}
    virtual bool is_renameable();
    virtual std::string get_detail(int field);
  };

  class SchemaRoutineGroupNode : public SchemaObjectNode
  {
  public:
    SchemaRoutineGroupNode(const db_DatabaseObjectRef &dbobject) : SchemaObjectNode(dbobject) {}
    virtual std::string get_detail(int field);
  };

  class SchemaRoutineNode : public SchemaObjectNode
  {
  public:
    SchemaRoutineNode(const db_DatabaseObjectRef &dbobject) : SchemaObjectNode(dbobject) {}
    virtual std::string get_detail(int field);
    virtual bool is_renameable();
  };

}; };

#endif /* _WB_OVERVIEW_PHYSICAL_SCHEMA_H_ */