added strftime filter function
This commit is contained in:
17
CHANGELOG.md
17
CHANGELOG.md
@@ -1,10 +1,25 @@
|
||||
## v0.36.0-rc.1
|
||||
## v0.36.0 (WIP)
|
||||
|
||||
- Minor list query and API rules optimizations:
|
||||
- Removed unnecessery correlated subquery expression when using back-relations via single `relation` field.
|
||||
- Replaced `DISTINCT` with `GROUP BY id` when rows deduplication is needed and when deemed safe.
|
||||
_This should help with having a more stable and predictable performance even if the collection records are on the larger side._
|
||||
|
||||
For some queries and data sets the above 2 optimizations have shown significant improvements but if you notice a performance degradation after upgrading,
|
||||
please open a Q&A discussion with export of your collections structure and the problematic request so that it can be analyzed.
|
||||
|
||||
- Added [`strftime(format, [timevalue, modifiers...])`](@todo link to docs) date formatting filter and API rules function.
|
||||
It operates similarly to the equivalent [SQLite `strftime` builtin function](https://sqlite.org/lang_datefunc.html)
|
||||
with the exception that for some operators the result will be coalesced for consistency with the non-nullable behavior of the default PocketBase fields.
|
||||
Multi-match expressions are also supported and works the same as if the collection field is referenced, for example:
|
||||
```js
|
||||
// requires any/at-least-one-of multiRel records to have created date matching the formatted string "2026-01"
|
||||
strftime('%Y-%m', multiRel.created) ?= "2026-01"
|
||||
|
||||
// requires ALL multiRel records to have created date matching the formatted string "2026-01"
|
||||
strftime('%Y-%m', multiRel.created) = "2026-01"
|
||||
```
|
||||
|
||||
|
||||
## v0.35.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user