OmniSciDB  c07336695a
ViewObject Struct Reference
+ Inheritance diagram for ViewObject:
+ Collaboration diagram for ViewObject:

Public Member Functions

void setup_objects ()
 
void remove_objects ()
 
 ViewObject ()
 
 ~ViewObject () override
 
void setup_objects ()
 
void remove_objects ()
 
 ViewObject ()
 
 ~ViewObject () override
 

Detailed Description

Definition at line 26 of file CalciteOptimizeTest.cpp.

Constructor & Destructor Documentation

◆ ViewObject() [1/2]

ViewObject::ViewObject ( )
inlineexplicit

Definition at line 52 of file CalciteOptimizeTest.cpp.

52 { setup_objects(); }

◆ ~ViewObject() [1/2]

ViewObject::~ViewObject ( )
inlineoverride

Definition at line 53 of file CalciteOptimizeTest.cpp.

53 { remove_objects(); }

◆ ViewObject() [2/2]

ViewObject::ViewObject ( )
inlineexplicit

Definition at line 195 of file DBObjectPrivilegesTest.cpp.

195 { setup_objects(); }

◆ ~ViewObject() [2/2]

ViewObject::~ViewObject ( )
inlineoverride

Definition at line 196 of file DBObjectPrivilegesTest.cpp.

196 { remove_objects(); }

Member Function Documentation

◆ remove_objects() [1/2]

void ViewObject::remove_objects ( )
inline

Definition at line 42 of file CalciteOptimizeTest.cpp.

References run_ddl_statement().

42  {
43  run_ddl_statement("DROP VIEW view_view_table1;");
44  run_ddl_statement("DROP VIEW view_table1;");
45  run_ddl_statement("DROP TABLE table1");
46  run_ddl_statement("DROP VIEW attribute_view");
47  run_ddl_statement("DROP VIEW shape_view");
48  run_ddl_statement("DROP TABLE shape_table");
49  run_ddl_statement("DROP TABLE attribute_table");
50  }
void run_ddl_statement(std::string ddl)
+ Here is the call graph for this function:

◆ remove_objects() [2/2]

void ViewObject::remove_objects ( )
inline

Definition at line 186 of file DBObjectPrivilegesTest.cpp.

References run_ddl_statement().

186  {
187  run_ddl_statement("DROP VIEW bill_view_outer;");
188  run_ddl_statement("DROP VIEW bill_view;");
189  run_ddl_statement("DROP TABLE bill_table");
190 
191  run_ddl_statement("DROP USER foo;");
192  run_ddl_statement("DROP ROLE salesDept;");
193  run_ddl_statement("DROP USER bob;");
194  }
void run_ddl_statement(std::string ddl)
+ Here is the call graph for this function:

◆ setup_objects() [1/2]

void ViewObject::setup_objects ( )
inline

Definition at line 27 of file CalciteOptimizeTest.cpp.

References run_ddl_statement().

27  {
28  run_ddl_statement("CREATE TABLE table1(i1 integer, i2 integer);");
29  run_ddl_statement("CREATE VIEW view_table1 AS SELECT i1, i2 FROM table1;");
30  run_ddl_statement("CREATE VIEW view_view_table1 AS SELECT i1, i2 FROM view_table1;");
31  run_ddl_statement("CREATE TABLE shape_table (block_group_id INT)");
33  "CREATE TABLE attribute_table( block_group_id INT, segment_name TEXT ENCODING "
34  "DICT(8), segment_type TEXT ENCODING DICT(8), agg_column TEXT ENCODING DICT(8))");
36  "CREATE VIEW attribute_view AS select "
37  "rowid,block_group_id,segment_name,segment_type,agg_column from attribute_table");
39  "CREATE VIEW shape_view AS select rowid, block_group_id from shape_table");
40  }
void run_ddl_statement(std::string ddl)
+ Here is the call graph for this function:

◆ setup_objects() [2/2]

void ViewObject::setup_objects ( )
inline

Definition at line 175 of file DBObjectPrivilegesTest.cpp.

References run_ddl_statement().

175  {
176  run_ddl_statement("CREATE USER bob (password = 'password', is_super = 'false');");
177  run_ddl_statement("CREATE ROLE salesDept;");
178  run_ddl_statement("CREATE USER foo (password = 'password', is_super = 'false');");
179  run_ddl_statement("GRANT salesDept TO foo;");
180 
181  run_ddl_statement("CREATE TABLE bill_table(id integer);");
182  run_ddl_statement("CREATE VIEW bill_view AS SELECT id FROM bill_table;");
183  run_ddl_statement("CREATE VIEW bill_view_outer AS SELECT id FROM bill_view;");
184  }
void run_ddl_statement(std::string ddl)
+ Here is the call graph for this function:

The documentation for this struct was generated from the following files: