This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-03
Channels
- # aws (1)
- # bangalore-clj (3)
- # beginners (3)
- # boot (9)
- # business (1)
- # cljs-dev (72)
- # cljsjs (7)
- # clojure (86)
- # clojure-austin (1)
- # clojure-belgium (4)
- # clojure-brasil (14)
- # clojure-conj (3)
- # clojure-dev (10)
- # clojure-italy (4)
- # clojure-poland (14)
- # clojure-russia (36)
- # clojure-spec (144)
- # clojure-uk (50)
- # clojurebridge (1)
- # clojurescript (160)
- # clr (2)
- # core-async (8)
- # cursive (56)
- # datomic (34)
- # devcards (3)
- # emacs (2)
- # ethereum (1)
- # events (3)
- # hoplon (21)
- # jobs (2)
- # leiningen (9)
- # luminus (3)
- # off-topic (1)
- # om (26)
- # onyx (42)
- # pedestal (29)
- # protorepl (1)
- # re-frame (43)
- # reagent (26)
- # rethinkdb (4)
- # ring-swagger (4)
- # spacemacs (5)
- # specter (4)
- # untangled (102)
- # vim (43)
- # yada (10)
@jaret @marshall one of the things that worries me is how easily someone can delete a database in Datomic. what protections do we have, other than code review and preventing the use of remote repls entirely?
It's pretty easy to drop most databases (postgres, mysql...) if you have root access. Are backups not enough protection against that?
we have hourly backups. but, prevention is better than cure. also, other dbs allow you differing levels of access - ie, no DELETE commands, whereas due to Datomic’s design, the peer has full privileges
i don’t want to have to deal with any data loss at all, and this is one of the gaps i’m aware of
we love our remote repls — they afford us a lot of power. but that datomic.api/delete-database
is so near to hand 😱
we already only allow our transactor DDB writes, but if the txor does the delete (which i’m pretty sure it does), that doesn’t help us
so i’m wondering what we can do if it is deleted to restore it (i know it sticks around in storage for a while), or what we can do to prevent deletion
@robert-stuttaford at present there is no configurable option on these api calls. Your approach of preventing remote REPLs and reviewing code is the current recommendation. We’ll register the request for more configurable control over the api.
thanks, @jaret. i think it’s definitely worth adding some protection, but i have no idea how best to actually do that.
@vipaca AFAIK datomic doesn't have any inherent notion of order. You can add an :item/index
attribute and query using limit+offset.
I was just looking at this http://docs.datomic.com/pull.html#limit-expressions
That + predicate expressions: http://docs.datomic.com/query.html#sec-5-11-1
Hey, this kind of feels like a newbie question, but I have a company with a list of members, and I’m using the pull syntax to get them out like this:
(d/pull db '[:company/members] [:company/slug slug])
=> #:company{:members
[#:db{:id 285873023222825}
#:db{:id 285873023222826}
#:db{:id 285873023222827}]}
..is there a way to tell the pull API that I just want the list of members so I don’t have to (-> (d/pull …) :company/members)
?
I know (d/query)
has some options for that in the pattern syntax
No, the namespace syntax is fine, what I want to do is control the nesting
No prob… I mean like with query I can say (d/query [attribute …])
vs (d/query attribute)
to control the shape of the data coming back
Just wondering if there’s an analogous control for the pull API
I don't believe so. The idea is you get the nested hierarchy of the data structure as specified in the pull patter
And since this is a multi cardinality attribute, you'll get the map of attribute name to set of values
Hmm, yeah, I guess since I’m giving it an EID to start with that makes some sense.
Ok, cool. Thanks!