This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-06
Channels
- # admin-announcements (266)
- # alda (20)
- # announcements (1)
- # aws (16)
- # beginners (16)
- # boot (288)
- # brevis (7)
- # cljs-dev (40)
- # cljsjs (32)
- # cljsrn (5)
- # clojars (23)
- # clojure (169)
- # clojure-art (2)
- # clojure-czech (3)
- # clojure-finland (1)
- # clojure-italy (3)
- # clojure-norway (1)
- # clojure-russia (88)
- # clojure-sg (3)
- # clojurescript (300)
- # clojurewerkz (8)
- # community-development (14)
- # component (4)
- # core-matrix (1)
- # cursive (9)
- # datavis (26)
- # datomic (44)
- # devcards (3)
- # funcool (1)
- # hoplon (7)
- # jobs (4)
- # ldnclj (11)
- # lein-figwheel (1)
- # nyc (2)
- # off-topic (4)
- # om (149)
- # onyx (1)
- # overtone (1)
- # parinfer (15)
- # proton (3)
- # re-frame (9)
- # reagent (45)
- # yada (2)
So I get the impression that non-additive changes to the schema are tricky. Is creating a new DB and re-importing data the only way to fundamentally alter the schema?
And is this feasible to do?
I'm just worried that if our requirements change down the road in a way we did not anticipate, are we stuck?
@currentoor: it depends on what you need to change. Supported schema alteration is documented here: http://docs.datomic.com/schema.html#Schema-Alteration
Right so when they say "You cannot alter :db/valueType or :db/fulltext." Can I work around that with a re-import?
if absolutely necessary?
Or would that not work?
@currentoor: I think it would work but in the case of a valueType change you'd need to convert all relevant datoms in each tx during import from old type to new type.
I see.
Makes sense.
is there a way to specify the transactor’s host via environment variables, rather than in the config file?
@currentoor: you can also use renaming. :old-typeA. make :new-typeB, transact all the values (while converting types) from :old to :new, and then rename :old to :old-unused and :new to :old.
disadvantage: you lose all your transaction time history, but then you would anyway if you recreated your db without re transacting everything in time order
@isaac: you can’t nest function calls in datalog. if you need to, you should defer to a namespaced function instead
@robert-stuttaford: thanks
@robert-stuttaford: Is that means nested function not supported? or I need use namespaced function?
@isaac: not supported. must use namespaced function
nested function calls are not supported. you must use a namespaced function call instead. no: [(= (f ?x) (f ?y)]
yes: [(my.ns/is-=-with-f? ?x ?y)]
got it, now?
@robert-stuttaford: I got it ,thank you
@isaac: there’s also an example stepped out (rather than writing a custom function and calling it with namespaced example) here: http://stackoverflow.com/questions/32164131/parameterized-and-case-insensitive-query-in-datalog-datomic/32323123#32323123
So i.e.:
[ (re-find (re-pattern (str "(?i)" ?par)) ?bfn)]
Becomes:
[(str "(?i)" ?match) ?matcher]
[(re-pattern ?matcher) ?regex]
[(re-find ?regex ?aname)]
@bkamphaus: that good, thanks
I am wondering if it is possible to make a sort of custom as-of function. I am marking my transactions with a “transaction time” or :db/tt instant, which is different (and before) :db/txInstant (which is when the data was received in my use case), and I want to be able to query datoms that have :db/tt that are before a certain time.
Hi. How do I get last Datomic version?
UPD: Found this: https://my.datomic.com/downloads/pro Last one must be on the top of the list
@casperc: Sure, why not just write a function to find the tx with the correct :db/tt
and then use as-of
with that tx's id?
@domkm: I thought about that, but I need the as-of to operate on the :db/tt
value, not :db/txInstant
I think that filter might be a workable solution though, so I am taking a look at that
@domkm: I don’t need the database as-of the txInstant of some :db/tt, I need all datoms with :db/tt bigger than some date. There is a difference in my use case