original_string: public static function fromConnection(Connection $connection, $table, array $types = [])
      {
          $name = $connection->getDriver()->getName();
          switch ($name) {
          case 'pdo_mysql':
              return new MysqlSelector($connection, $table, $types);
          case 'pdo_sqlite':
              return new SqliteSelector($connection, $table, $types);
          default:
              throw new DBALException("Unsupported database type: $name");
          }
      }
code: public static function fromConnection(Connection $connection, $table, array $types = [])
      {
          $name = $connection->getDriver()->getName();
          switch ($name) {
          case 'pdo_mysql':
              return new MysqlSelector($connection, $table, $types);
          case 'pdo_sqlite':
              return new SqliteSelector($connection, $table, $types);
          default:
              throw new DBALException("Unsupported database type: $name");
          }
      }
code_tokens: public static function fromConnection ( Connection $ connection , $ table , array $ types = [ ] ) { $ name = $ connection -> getDriver ( ) -> getName ( ) ; switch ( $ name ) { case 'pdo_mysql' : return new MysqlSelector ( $ connection , $ table , $ types ) ; case 'pdo_sqlite' : return new SqliteSelector ( $ connection , $ table , $ types ) ; default : throw new DBALException ( "Unsupported database type: $name" ) ; } }
docstring: Get a vendor-specific selector based on a connection instance.
  
  @param  Connection       $connection A connection instance
  @param  string           $table      The table to select from
  @return AbstractSelector A selector instance
  @throws DBALException
docstring_tokens: Get a vendor - specific selector based on a connection instance .