InfluxDB\Client::selectDB PHP Method

selectDB() public method

Use the given database
public selectDB ( string $name ) : Database
$name string
return Database
    public function selectDB($name)
    {
        return new Database($name, $this);
    }

Usage Example

Example #1
0
 public function testSelectDbShouldReturnDatabaseInstance()
 {
     $client = new Client('localhost', 8086);
     $dbName = 'test-database';
     $database = $client->selectDB($dbName);
     $this->assertInstanceOf('\\InfluxDB\\Database', $database);
     $this->assertEquals($dbName, $database->getName());
 }
All Usage Examples Of InfluxDB\Client::selectDB