Fork me on GitHub
#datomic
<
2016-06-28
>
robert-stuttaford10:06:48

can i restore a database that was backed up as name A but restore it to name B -- the transactor has no existing copies of the db in storage?

stuarthalloway11:06:22

@robert-stuttaford: sure can "Restore can rename databases. However, you cannot restore a single database to two different URIs within the same storage.” — http://docs.datomic.com/backup.html#restoring

robert-stuttaford11:06:45

thanks, Stuart. i thought so, but i wasn't sure

leontalbot11:06:02

@conaw have you found an answer?

conaw11:06:21

@leontalbot: my answer was to only recursively pull explicit relationships, and then pull wildcard for each of those separately

pheuter20:06:05

Is it possible to enforce Datomic to do a write and fail with a uniqueness conflict if it will do an update, that is if a lookup-ref already exists?

pheuter20:06:36

The driving force for this is to explicitly separate creating new entities from updating existing ones.

pheuter20:06:33

It seems like one possible solution is to create a database function that does a lookup for any possible look-up refs and fails the transaction if results come back, but I was hoping there may be a more straightforward solution.

Chris O’Donnell21:06:34

@pheuter: I believe if you use :db.unique/value rather than :db.unique/identity, you'll get the fail rather than update behavior (see http://docs.datomic.com/identity.html)

pheuter21:06:12

Hm, but doesn’t :db.unique/value serve as a lookup ref as well?

pheuter21:06:02

Oh I see: > Unique values have the same semantics as unique identities, with one critical difference: Attempts to assert a new tempid with a unique value already in the database will cause an IllegalStateException.

pheuter21:06:16

Good catch!