juji-io / datalevin

A simple, fast and versatile Datalog database
https://github.com/juji-io/datalevin
Eclipse Public License 1.0
1.07k stars 60 forks source link

Dumping keywords with spaces 😭 #198

Closed jdf-id-au closed 1 year ago

jdf-id-au commented 1 year ago

Thank you for a glorious library.

This is an exceedingly cursed request, I'm sorry.

I managed to store keywords containing spaces, e.g. {:cursed key :ok-value}. This gives No dispatch macro for: when trying to reload a dumped database for version upgrade.

(Direct(edn/read-string "{:cursed key :ok-value}") gives Map literal must contain an even number of forms though, so maybe I'm missing something else.)

Is this something which could be mitigated up with a custom tagged literal on export (and custom reader on import)? Or is it so cursed that it deserves #wontfix ?

jdf-id-au commented 1 year ago

Oh dear found my problem. I had a super-evil keyword which was :something #, which is the source of the No dispatch macro... error. This is clearly my own fault and not Datalevin's concern!