Skip to content

Custom SQLite collations #163

Open
Open
@zopsicle

Description

DBD::SQLite supports custom collations. This is a useful feature for e.g. sorting version numbers. It would be nice if DBDish::SQLite also supported this.

Relevant API: https://www.sqlite.org/c3ref/create_collation.html

Example usage:

$dbh.create-collation(version, { Version.new($^a) cmp Version.new($^b) });

$dbh.execute(q:to/SQL);
    SELECT * FROM tbl ORDER BY vsn COLLATE version
    SQL

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions