InfluxDB\Database::exists PHP Méthode

exists() public méthode

public exists ( ) : boolean
Résultat boolean
    public function exists()
    {
        $databases = $this->client->listDatabases();
        return in_array($this->name, $databases);
    }

Usage Example

 public function testNotExists()
 {
     $database = new Database('test_not_exists', $this->mockClient);
     $this->assertEquals($database->exists(), false);
 }