Skip to content

Commit 42d832d

Browse files
authored
Possible fix for .range
Possible fix for that issue vapor/fluent#514
1 parent 4ebcd66 commit 42d832d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Sources/PostgreSQL/Query/PostgreSQLQuery+Select.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,14 @@ extension PostgreSQLSerializer {
7474
sql.append("ORDER BY")
7575
sql.append(select.orderBy.map { serialize($0, &binds) }.joined(separator: ", "))
7676
}
77+
if let limit = select.limit {
78+
sql.append("LIMIT")
79+
sql.append(String(describing: limit))
80+
}
81+
if let offset = select.offset {
82+
sql.append("OFFSET")
83+
sql.append(String(describing: offset))
84+
}
7785
return sql.joined(separator: " ")
7886
}
7987
}

0 commit comments

Comments
 (0)