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");
        }
    }