displayed, in place of ->str

->str is deprecated in the prelude.

🤖 Generated with [ECA](https://eca.dev)

Co-Authored-By: eca-agent <git@eca.dev>
This commit is contained in:
Linus Björnstam 2026-10-21 15:47:04 +02:00
parent 8a43fdeecc
commit 1df6c992b2

View file

@ -152,7 +152,7 @@
(ignore (ok! (insert db events (event (uuid-v7) "2026-10-12T09:00:00Z" "100.00"))))
(ignore (ok! (insert db events (event (uuid-v7) "2026-10-12T10:00:00+02:00" "-3.00"))))
(expect "ORDER BY an instant"
(list-map (fun (e) (->str (record-ref e happened))) (ok! (fetch db events '(select (order-by happened)))))
(list-map (fun (e) (displayed (record-ref e happened))) (ok! (fetch db events '(select (order-by happened)))))
(list "2026-10-12T08:00:00Z" "2026-10-12T09:00:00Z" "2026-10-12T09:00:00.25Z" "2026-10-12T09:00:00.5Z"))
(expect "ORDER BY a version 7 uuid sorts by the time it was made"
(list-map (fun (e) (decimal->string (record-ref e price))) (ok! (fetch db events '(select (order-by key)))))
@ -177,7 +177,7 @@
(expect "and read back"
(match (ok! (fetch-one db events '(select (where (tag not-null)))))
((Some e) (list (if (= (some! (record-ref e tag)) label) "the label" "another uuid")
(->str (record-ref e note))))
(displayed (record-ref e note))))
(None (list "none")))
(list "the label" "(Some 2026-01-01T00:00:00Z)"))
(expect "set back to NULL"
@ -189,8 +189,8 @@
(admin #t) (avatar (Some #[1uy 2uy 3uy]))))))
(expect "an #:auto key comes back" (record-ref ada id) 1)
(expect "the rest of the row"
(str (record-ref ada name) " " (->str (record-ref ada email)) " " (double->string (record-ref ada score))
" " (->str (record-ref ada admin)) " "
(str (record-ref ada name) " " (displayed (record-ref ada email)) " " (double->string (record-ref ada score))
" " (displayed (record-ref ada admin)) " "
(match (record-ref ada avatar) ((Some b) (int->string (array-length b))) (None "none")))
"Ada (Some ada@example.org) 9.5 True 3")
(expect "insert-all"