Skip to content

Make KeysetColumn<T> part of public API. #58

@skwasjer

Description

@skwasjer

I would like to be able to assert in unit tests which columns (eg. the expression(s) and its sort direction(s)) are configured on the KeysetPaginationBuilder<T>. But currently the builder its Columns property is internal everywhere (also on the KeysetPaginationContext, as is the KeysetColumn<T> type.

Can we selectively make some of this public? I'd understand you want to avoid exposing too much to keep the API surface small, but tests require too much setup because I have to run the complete query logic, and am effectively writing integration tests. For small unit tests, I do not care and just want to verify that the columns used is correct. I do not really see any downsides of exposing the column expression and direction?

I could also extract it with an expression visitor but this is way too cumbersome and I'd still have to build the entire query (which in my use case is not relevant). Or do you have another recommendation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions