OmniSciDB  c0231cc57d
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
com.mapd.parser.extension.ddl.AlterDatabaseTest Class Reference
+ Inheritance diagram for com.mapd.parser.extension.ddl.AlterDatabaseTest:
+ Collaboration diagram for com.mapd.parser.extension.ddl.AlterDatabaseTest:

Public Member Functions

 AlterDatabaseTest ()
 
void AlterDatabaseChangeOwner () throws Exception
 
void AlterDatabaseRename () throws Exception
 
- Public Member Functions inherited from com.mapd.parser.extension.ddl.DDLTest
void setup () throws Exception
 

Additional Inherited Members

- Protected Attributes inherited from com.mapd.parser.extension.ddl.DDLTest
String resourceDirPath
 
String jsonTestDir
 
- Static Protected Attributes inherited from com.mapd.parser.extension.ddl.DDLTest
static final Gson gson = new Gson()
 
- Package Functions inherited from com.mapd.parser.extension.ddl.DDLTest
TPlanResult processDdlCommand (final String ddlCommand) throws Exception
 
JsonObject getJsonFromFile (final String fileName) throws Exception
 

Detailed Description

Definition at line 13 of file AlterDatabaseTest.java.

Constructor & Destructor Documentation

com.mapd.parser.extension.ddl.AlterDatabaseTest.AlterDatabaseTest ( )
inline

Definition at line 14 of file AlterDatabaseTest.java.

References com.mapd.parser.extension.ddl.DDLTest.jsonTestDir, and com.mapd.parser.extension.ddl.DDLTest.resourceDirPath.

14  {
15  resourceDirPath = AlterDatabaseTest.class.getClassLoader().getResource("").getPath();
16  jsonTestDir = "database";
17  }

Member Function Documentation

void com.mapd.parser.extension.ddl.AlterDatabaseTest.AlterDatabaseChangeOwner ( ) throws Exception
inline

Definition at line 20 of file AlterDatabaseTest.java.

References com.mapd.parser.extension.ddl.DDLTest.getJsonFromFile(), com.mapd.parser.extension.ddl.DDLTest.processDdlCommand(), and run_benchmark_import.result.

20  {
21  final JsonObject expectedJsonObject =
22  getJsonFromFile("alter_database_change_owner.json");
23  final TPlanResult result =
24  processDdlCommand("ALTER DATABASE test_database OWNER TO Joe;");
25  final JsonObject actualJsonObject =
26  gson.fromJson(result.plan_result, JsonObject.class);
27 
28  assertEquals(expectedJsonObject, actualJsonObject);
29  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:50
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:35

+ Here is the call graph for this function:

void com.mapd.parser.extension.ddl.AlterDatabaseTest.AlterDatabaseRename ( ) throws Exception
inline

Definition at line 32 of file AlterDatabaseTest.java.

References com.mapd.parser.extension.ddl.DDLTest.getJsonFromFile(), com.mapd.parser.extension.ddl.DDLTest.processDdlCommand(), and run_benchmark_import.result.

32  {
33  final JsonObject expectedJsonObject = getJsonFromFile("alter_database_rename.json");
34  final TPlanResult result =
35  processDdlCommand("ALTER DATABASE my_database RENAME TO my_new_database;");
36  final JsonObject actualJsonObject =
37  gson.fromJson(result.plan_result, JsonObject.class);
38 
39  assertEquals(expectedJsonObject, actualJsonObject);
40  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:50
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:35

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: