I like to do stuff like:
(db "insert" "collection" {:id 1 :name "Aaron"})
However, to read this, I have to do:
(get (db "select" "collection" {"where" ["=" :id 1]}) "name")
And the use of a string parameter to "get" is troubling to me. I'd
much prefer to say:
(:name (db "select" "collection" {"where" ["=" :id 1]}))
Is this related to the use of json as query transport?
Good to hear!
> I like to do stuff like:
>
> (db "insert" "collection" {:id 1 :name "Aaron"})
>
> However, to read this, I have to do:
>
> (get (db "select" "collection" {"where" ["=" :id 1]}) "name")
>
> And the use of a string parameter to "get" is troubling to me. I'd
> much prefer to say:
>
> (:name (db "select" "collection" {"where" ["=" :id 1]}))
>
> Is this related to the use of json as query transport?
Right; JSON does not support keyword types. More generally, I designed
FleetDB to be accessible from a variety of languages, including ones
like Java and Python that don't have native support for keywords. For
these languages to interact nicely with FleetDB I had to avoid baking
in the concept of keywords.
- Mark
>
> --
> To unsubscribe, reply using "remove me" as the subject.
>