Skip to content

Subscription and View Optimised #[index(page(page_size)) index #4750

@xDovos

Description

@xDovos

it would be really useful to have an index type for pagination. my idea is #[index(page(page_size)) (idk rust enough if that is valid/good syntax for this) that is accessed with ctx.db.table.column.page(nr) and returns the subset of rows defined by the page_size that's sorted by the column it was used on.

this would simplify and optimise leaderboards, Auction pages, any form of listings and so on a lot.
once view parameters are out, it would be possible to make a view that takes the page nr as parameter and then just get the subset without having to manually sort and subset the data within the view.

as for the client updates, the client could just insert sort the new and deleted rows, so there is no need to change bsatn or the WS protocol for that

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions