Fork me on GitHub
#datomic
<
2016-01-06
>
currentoor00:01:26

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?

currentoor00:01:52

And is this feasible to do?

currentoor00:01:20

I'm just worried that if our requirements change down the road in a way we did not anticipate, are we stuck?

Ben Kamphaus00:01:46

@currentoor: it depends on what you need to change. Supported schema alteration is documented here: http://docs.datomic.com/schema.html#Schema-Alteration

currentoor00:01:26

Right so when they say "You cannot alter :db/valueType or :db/fulltext." Can I work around that with a re-import?

currentoor00:01:36

if absolutely necessary?

currentoor00:01:51

Or would that not work?

domkm00:01:25

@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.

currentoor00:01:03

Makes sense.

atroche01:01:36

is there a way to specify the transactor’s host via environment variables, rather than in the config file?

robert-stuttaford04:01:39

@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.

robert-stuttaford04:01:21

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

jimmy07:01:49

hi guys what is part in db.part in datomic ?

isaac07:01:31

why [(= (f ?var-1) (f ?var-2))] is invalid?

isaac07:01:40

I know there is a equivalent way: [(f ?var-1) ?value] [(f ?var-2) ?value]

robert-stuttaford07:01:41

@isaac: you can’t nest function calls in datalog. if you need to, you should defer to a namespaced function instead

isaac07:01:49

@robert-stuttaford: Is that means nested function not supported? or I need use namespaced function?

robert-stuttaford09:01:12

@isaac: not supported. must use namespaced function

robert-stuttaford09:01:00

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)]

isaac12:01:00

@robert-stuttaford: I got it ,thank you

Ben Kamphaus15:01:32

@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)]

isaac17:01:57

@bkamphaus: that good, thanks

casperc19:01:00

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.

casperc19:01:09

Is that at all possible?

andrewboltachev20:01:42

Hi. How do I get last Datomic version?

andrewboltachev20:01:17

UPD: Found this: https://my.datomic.com/downloads/pro Last one must be on the top of the list simple_smile

domkm20:01:19

@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?

casperc20:01:57

@domkm: I thought about that, but I need the as-of to operate on the :db/tt value, not :db/txInstant

casperc20:01:28

I think that filter might be a workable solution though, so I am taking a look at that

domkm20:01:43

as-of takes a t, tx, or inst

domkm20:01:02

just give it the tx id of the tx with the desired :db/tt

casperc20:01:42

@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

domkm20:01:18

Yeah, then filter

casperc20:01:39

Don’t know how it performs though, but I guess I will find out simple_smile

domkm20:01:42

@casperc: index-range might also be useful for you

casperc20:01:29

@domkm: I was looking at that too, but I don’t quite see how it can help me, unfortunately

ljosa20:01:49

I'm benchmarking a query (a big pull of a few hundred entities) both as a peer and via the REST API. To my great surprise, querying via the REST API is consistently faster. Can I believe this result? Does the REST server do some clever caching of serialized results or something?