Skip to content

Better API for Expr::sort(bool, bool); // acktually BOOL BOOL #20227

@Banyc

Description

@Banyc

Current implementation:

// all docs about `sort` is always followed by a comment
col("a").sort(true, false); // yeah but a bit no
col("a").sort(false, true); // no but also yeah
col("a").sort(true, true); // hell yeah
col("a").sort(false, false); // hell no

vs.

Suggested implementation:

// pick a better poison
col("a").sort(SortOpt::AscNullFirst); // can't believe
col("a").sort(SortOpt{ asc: true, null_first: false }); // you guessed it
col("a").sort().asc().null_first(); // without comments!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions