mirror of
https://github.com/Donkie/Spoolman.git
synced 2026-10-22 01:52:17 -05:00
The previous commit claimed the built-in timestamps and the datetime extra fields share a grammar, then wrote that grammar out twice: once in add_where_clause_datetime_opt for the typed columns, once inline in add_where_clause_extra_field for the JSON-stored ones. Two copies of a grammar drift, which would quietly falsify the thing the change was for. The `<start>|<end>` split and its "at least one end" rule now live in split_datetime_range_filter, which both call. Only the parsing is shared, because only the parsing can be: an extra field is JSON text in a joined key/value table, reached through a subquery, while a built-in is a typed column on the row. The comparison that follows the split therefore stays separate, and the two are not equivalent. The built-in path parses the bound and compares real datetimes; the extra-field path compares decoded ISO strings, so an offset or a missing '.000' changes the answer there and not here. That asymmetry is now written down at both sites, and tracked in #1057.