pub async fn list_entries(
pool: &SqlitePool,
did: &str,
view: ListView,
feed_ids: Option<&[i64]>,
limit: i64,
offset: i64,
) -> Result<Vec<EntryListRow>>Expand description
One page of a list view, newest-published first, scoped to did’s
subscriptions (sub_ref) and optionally narrowed to feed_ids.
limit is a required parameter, not a convenience. This function
replaced three SELECT e.* queries that had no LIMIT at all and pulled the
article body they never used; leaving an unbounded variant next to the
bounded one would just be the same trap with a longer name. If a caller wants
“everything”, it has to say how much everything is allowed to be. See
EntryListRow for what the projection deliberately omits and why.
feed_ids = Some(&[]) means “no feeds in scope” and returns empty without
touching the database — distinct from None, which means “every feed this
DID subscribes to”.