         
         return QueryImpl(dataset: ErasedTable(name: dataset.name, columns: columns),
                          predicate: predicate,
-                         order: order)
+                         order: order,
+                         limit: nil)
     }
 }
 

        let columns = render(columns: dataset, aliases: aliases)
        let source = dataset.render(dialect: self, aliases: aliases)
        
        let ssql = "SELECT " + columns + " FROM " + source
        let fsql = filter.render(dialect: self, aliases: aliases)
        
        let sql = ssql + (fsql.map {" WHERE " + $0 + ";"} ?? SQL(query: ";", parameters: []))
        
        let paramsFixed = sql.parameters.map { param -> Any? in
            param.map { value in


public extension Query where DS : Table {
    public func filter(_ f: (DS)->Predicate) -> QueryImpl<DS> {
        return QueryImpl(dataset: dataset, predicate: f(dataset) && predicate, order: order, limit: limit)
    }
}

public extension Query where DS : JoinProtocol, DS.Left : Table {
    public func filter(_ f: (DS.Left, DS.Right)->Predicate) -> QueryImpl<DS> {
        return QueryImpl(dataset: dataset, predicate: (dataset.datasets |> f) && predicate, order: order, limit: limit)
    }
}

