Skip to content

Instantly share code, notes, and snippets.

@jtmarmon
Last active August 29, 2015 14:21
Show Gist options
  • Save jtmarmon/2564f410e68b8e08ce3c to your computer and use it in GitHub Desktop.
Save jtmarmon/2564f410e68b8e08ce3c to your computer and use it in GitHub Desktop.
(d/transact
datomic
[{:db/id #db/id [:db.part/tx]
:db/txInstant #inst "2011-01-01"}
{:db/id #db/id [:db.part/db]
:db/ident :test/str
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one
:db.install/_attribute :db.part/db}])
(d/transact datomic [{:db/id #db/id [:db.part/tx]
:db/txInstant #inst "2011-01-03"}]) ; Success
(d/transact datomic [{:db/id #db/id [:db.part/tx]
:db/txInstant #inst "2011-01-02"}]) ; IllegalArgumentExceptionInfo :db.error/past-tx-instant Time conflict: Sat Jan 01 19:00:00 EST 2011 is older than database basis datomic.error/deserialize-exception (error.clj:124)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment