Spanner/src/SpannerClient.php
public function connect($instance, $name, array $options = [])
    {
        if (is_string($instance)) {
            $instance = $this->instance($instance);
        }

        $database = $instance->database($name, $options);

        return $database;
    }
public function connect($instance, $name, array $options = [])
    {
        if (is_string($instance)) {
            $instance = $this->instance($instance);
        }

        $database = $instance->database($name, $options);

        return $database;
    }
public function connect ( $ instance , $ name , array $ options = [ ] ) { if ( is_string ( $ instance ) ) { $ instance = $ this -> instance ( $ instance ) ; } $ database = $ instance -> database ( $ name , $ options ) ; return $ database ; }
Connect to a database to run queries or mutations.

Example:
```
$database = $spanner->connect('instance-id', 'database-id');
```

@param Instance|string $instance The instance object or instance name.
@param string $name The database name.
@param array $options [optional] {
Configuration options.

@type SessionPoolInterface $sessionPool A pool used to manage
sessions.
}
@return Database
Connect to a database to run queries or mutations .