Skip to content

Add SQL where statement to collection rules #19155

@wpferguson

Description

@wpferguson

There are some (lots) of collections that can't be built using the current collection rules, such as collecting all images shot in a month irrespective of year as was discussed in https://discuss.pixls.us/t/filtering-collection-on-capture-date-but-by-month-only/51621

Describe the solution you'd like
The ability to write a SQL where clause such as strftime("%m", datetime_taken) = '05', which would be appended to select * from images where . The example given would select all images shot in May.

Alternatives
Perhaps a query builder, but I think that would be horribly difficult to make usable without making it huge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions