AntonTerekhov / OrientDB-PHP

Binary protocol for OrientDB for PHP applications (Beta)
http://code.google.com/p/orient/wiki/NetworkBinaryProtocol
BSD 3-Clause "New" or "Revised" License
108 stars 23 forks source link

DBExists throws an exception on non-existing DB #47

Open raymondjplante opened 9 years ago

raymondjplante commented 9 years ago

Facts

This works fine when the db being checked exists:

$db_name = "GratefulDeadConcerts";
$db = new OrientDB('localhost');
try {
   $db->connect('root', '<rootpassword>');
}catch (OrientDBException $e) {
    die('Failed to connect(): ' . $e->getMessage());
}
try {
    $exists = $db->DBExists($db_name);
} catch (OrientDBException $e) {
    die('Failed to execute DBExists(): ' . $e->getMessage());
}

 var_dump($exists);  // shows bool(true)

However, if I change $db_name to something non-existing, I get the following exception:

 Failed to execute DBExists(): java.lang.IllegalArgumentException: Cannot create database: storage mode 'local' is not supported.

Not sure if the issue is within the orientdb community server or your SDK .