public function scratch()
 {
     global $databaseConfig;
     $server = $databaseConfig['server'];
     $port = $databaseConfig['port'];
     $serverUsername = $databaseConfig['serverusername'];
     $serverPassword = $databaseConfig['serverpassword'];
     $username = $databaseConfig['username'];
     $password = $databaseConfig['password'];
     $dbName = $databaseConfig['database'];
     $clusterName = 'default';
     $log = '';
     try {
         $db = new OrientDB('localhost', 2424);
         $log .= 'Connected to localhost on port 2424 <br/>';
     } catch (Exception $e) {
         SS_Log::log(new Exception(print_r('Failed to connect: ' . $e->getMessage(), true)), SS_Log::NOTICE);
     }
     try {
         $connect = $db->connect($serverUsername, $serverPassword);
         $log .= 'Connected to DB as root <br />';
     } catch (OrientDBException $e) {
         SS_Log::log(new Exception(print_r('Failed to connect(): ' . $e->getMessage(), true)), SS_Log::NOTICE);
     }
     $exists = $db->DBExists($dbName);
     if ($exists) {
         $log .= "{$dbName} exists <br />";
     } else {
         SS_Log::log(new Exception(print_r('DB doesnt exist', true)), SS_Log::NOTICE);
     }
     $clusters = $db->DBOpen($dbName, $username, $password);
     $log .= "opened {$dbName} as admin user";
     //Get properties of a table
     try {
         SS_Log::log(new Exception(print_r($clusters, true)), SS_Log::NOTICE);
         $results = $db->command(OrientDB::COMMAND_QUERY, 'desc TestObject');
         SS_Log::log(new Exception(print_r($results, true)), SS_Log::NOTICE);
     } catch (OrientDBException $e) {
         SS_Log::log(new Exception(print_r($e->getMessage(), true)), SS_Log::NOTICE);
     }
     return $this->customise(new ArrayData(array('Title' => 'Orient DB Sandbox', 'SubTitle' => '', 'Content' => $log, 'Form' => '')))->renderWith(array('SandboxController', 'AppController'));
 }