Support of string keys.

This commit is contained in:
2026-06-30 09:25:22 +02:00
parent 0efd6e14cc
commit dde77071c2
+7 -2
View File
@@ -3,6 +3,7 @@
(require racket/contract (require racket/contract
racket/serialize racket/serialize
racket/port racket/port
racket/string
db db
) )
@@ -184,10 +185,14 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (value->string v) (define (value->string v)
(if (string? v)
v
(call-with-output-string (call-with-output-string
(λ (out) (write (serialize v) out)))) (λ (out) (write (serialize v) out)))))
(define (string->value v) (define (string->value v)
(if (and (string-prefix? v "((") (string-suffix? v ")"))
(deserialize (deserialize
(call-with-input-string v (λ (in) (read in))))) (call-with-input-string v (λ (in) (read in))))
v))