.sort(keys)Since v0.3.0
Once - This can only be used once.
Accepts a single key or an array of keys.
Sorts the results by the specified keys.
Prefixes:
-: Descending order.+: DEFAULT. Ascending order.Macros:
@random: Orders by sqlite's random() function. Useful for shuffling results.@rowid: NOT THE SAME AS id. Orders by sqlite's internal rowid. Can't be used with View Collections.const query = pbQuery<Post>()
.sort(['title', '-created'])
.build(pb.filter);
console.log(query.sort) // Output: 'title,-created'