This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-17
Channels
- # admin-announcements (1)
- # boot (24)
- # cider (8)
- # cljsjs (1)
- # cljsrn (5)
- # clojure (22)
- # clojure-greece (1)
- # clojure-italy (3)
- # clojure-russia (218)
- # clojure-spec (33)
- # clojurescript (51)
- # core-async (6)
- # cursive (1)
- # datomic (13)
- # defnpodcast (2)
- # funcool (2)
- # lein-figwheel (21)
- # onyx (41)
- # proto-repl (4)
- # protorepl (5)
- # reagent (4)
Hi. I’m new to Datomic. I have some problems with the Seattle example: https://github.com/espeed/dskel/blob/master/samples/seattle/getting-started.clj. The first thing that I don’t understand is why i can execute "(d/create-database uri)” and it returns true (success) and then stop the REPL, restart my computer and then try again and it returns false (like if the database still exists), so I have to execute "(d/delete-database uri)” first. It is an in memory database in the example "(def uri "datomic:<mem://seattle>”)”. I think this is the root of my problem, because what happens next is that I get ”duplicate key” errors when I try to load the data (submit the transaction), like if the data is already there, when I run the whole example again. Any ideas?
Hey all. Has anyone been using Spec-tacular much?
@paulspencerwilliams: well, I have! but I don’t think many other people do haha
@calvis: it looks like a neat DSL.
@calvis: can / would use use the specs as ‘records’ throughout the rest of an application, or keep these contained within a ‘db layer’, and use records or maps across the app?
@paulspencerwilliams: yes we use them throughout, I think the only time we don’t is when we have a required field on the database that isn’t necessarily required off the database. I’d like to add a more precise specification for that type of field
@calvis: and you just use the
(house
functions to create them as needed in controller for example?Cool. Cheers. Will play. It seemed a little boilerplaty to have both defrecords and defspecs around.
@teng: I tried to re-create the issue you are facing and was unsuccessful. Tell me if I have your steps in correct order: 1. Def the URI 2. d/create the uri 3. C-d (control D or quit the REPL) 4. Restart machine
@teng when I even c-d the Repl I am able to create a new in-memory DB with the same name with no problem.