Test the stable order of views with a primary key

This commit is contained in:
Gwendal Roué authored and Gwendal Roué committed 2025-09-23 17:12:27 +02:00
1 parent 99ecf76a77
commit ca27f75760
2 files changed
+69 -1

No files matched your search

@@ -286,7 +286,6 @@ extension SQLRelation: Refinable {
with { relation in
relation.ordering = relation.ordering.appending(Ordering(orderings: { [relation] db in
do {
#warning("TODO: test with views")
// Order by primary key. Don't order by rowid because those are
// not stable: rowids can change after a vacuum.
return try db.primaryKey(source.tableName).columns.map { SQLExpression.column($0).sqlOrdering }