datahike

https://datahike.io/, Join the conversation at https://discord.com/invite/kEBzMvb, history for this channel is available at https://clojurians.zulipchat.com/#narrow/stream/180378-slack-archive/topic/datahike
stathissideris 2021-06-26T11:43:42.056100Z

hello, what date objects can I store in datahike (using a file-based DB). I tried java.time.LocalDate but I get this exception:

kkuehne 2021-06-28T06:39:52.056700Z

Hi @stathissideris, we are only supporting java.util.Date at the moment because we have to write checks and comparators for each new class. What kind of Date classes would you like to see in Datahike?

stathissideris 2021-06-28T06:41:18.056900Z

I was thinking of using the classes Java 8 introduced to address the shortcomings of the older java.util.Date

stathissideris 2021-06-28T06:41:35.057100Z

such as LocalDate, LocalTime, LocalDateTime, ZonedDateTime etc

stathissideris 2021-06-28T06:42:06.057300Z

but I’m only evaluating so please don’t do any extra work on my account!

kkuehne 2021-06-28T06:44:11.057500Z

No problem at all. I'm just trying to understand what kind of use cases we could cover there.

whilo 2021-06-30T23:14:21.057900Z

@stathissideris Are there functions of the newer date classes you want to use in queries? In this case you would have to explicitly convert, which is not a big hassle, but I can understand that this is inconvenient. We could provide convenience functions for that though. If you can do all your reasoning on date itself and only need to convert when inserting into Datahike then this should be straightforward.

stathissideris 2021-06-26T11:44:03.056200Z

1. Caused by clojure.lang.ExceptionInfo
   Could not write key.
   {:type :write-error, :key :db, :exception #error {
    :cause "Cannot write 2018-09-17 as tag null"
    :via
    [{:type java.lang.IllegalArgumentException
      :message "Cannot write 2018-09-17 as tag null"
      :at [org.fressian.handlers.WriteHandlerLookup requireWriteHandler "WriteHandlerLookup.java" 48]}]
    :trace
    [[org.fressian.handlers.WriteHandlerLookup requireWriteHandler "WriteHandlerLookup.java" 48]
     [org.fressian.FressianWriter writeAs "FressianWriter.java" 458]
     [org.fressian.FressianWriter writeAs "FressianWriter.java" 464]
     [org.fressian.FressianWriter writeObject "FressianWriter.java" 472]

stathissideris 2021-06-26T11:50:17.056400Z

java.util.Date. seems to work, but I’d like to use the newer classes