This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-28
Channels
- # aws-lambda (2)
- # beginners (49)
- # boot (49)
- # cider (7)
- # clara (1)
- # cljsrn (4)
- # clojure (199)
- # clojure-android (49)
- # clojure-dev (1)
- # clojure-greece (4)
- # clojure-italy (3)
- # clojure-nl (4)
- # clojure-norway (5)
- # clojure-russia (78)
- # clojure-spec (22)
- # clojure-uk (18)
- # clojurebridge (2)
- # clojurescript (252)
- # core-typed (2)
- # cursive (11)
- # data-science (1)
- # datascript (2)
- # datomic (38)
- # devcards (1)
- # flambo (3)
- # hoplon (10)
- # immutant (2)
- # jobs (3)
- # luminus (1)
- # lumo (2)
- # off-topic (8)
- # om (3)
- # onyx (29)
- # parinfer (1)
- # pedestal (4)
- # portkey (13)
- # re-frame (13)
- # reagent (6)
- # ring (3)
- # ring-swagger (15)
- # schema (2)
- # spacemacs (4)
- # test-check (4)
- # untangled (46)
- # yada (2)
can anyone tell me how i'd dynamically create a transaction spec? i want to do something like:
(defn latest-query
([] '[:find (pull ?e [*]) :where [?e :arb/doctype]])
([doctype]
(let [doctype-attr (keyword "doctype" doctype)]
`[:find (pull ?e [*])
:where [?e :arb/doctype ~doctype-attr]])))
But this doesn't work since the syntax quote creates a mess of stuff that doesn't belong due to the namespacing:
[:find
(datemo.routes/pull datemo.routes/?e [clojure.core/*])
:where
[datemo.routes/?e :arb/doctype :doctype/note]]
On the other hand, using a regular '
wont' work because it doesn't allow for unquoting...Actually, just figured out one way to do it that's kind of ugly:
(defn latest-query
([] '[:find (pull ?e [*]) :where [?e :arb/doctype]])
([doctype]
(let [doctype-attr (keyword "doctype" doctype)]
[:find '(pull ?e [*])
:where ['?e ':arb/doctype doctype-attr]])))
Maybe there's a nicer way to do this?
@ezmiller77 what do you mean, 'a transaction spec' ?
@val_waeselynck I just mean the edn for a transaction...
I guess the docs call it "tx-data"
@ezmiller77 it does look like a query 🙂
Well @val_waeselynck I dont' really care to quibble about symantics.
@augustl that's a nice soln!
@ezmiller77 only mentioning it because a query and a transaction are fundamentally very different things
@ezmiller77 I don't think it's fair to call it quibbling, you should know the difference just so you can choose between d/q
and d/transact
as in, Datomic is not like SQL where you use the same system for reading and writing, they are pretty different
but hey, sorry to have interrupted you with my quibbling. good day!
@ezmiller77 the advantage of parameterizing the query is that datomic will cache the query as well
right you are.
Does anybody know if it's possible to backup/restore and rotate log files to an S3-compatible store? I don't see a way of specifying an endpoint URL in the command line tools, and all attempts so far have resulted in the default http://s3.amazonaws.com endpoint appearing in the logged exceptions.
@dominicm Yes, I've specified a custom address in the aws-s3-log-bucket-id
property but it's ignored. The implementation seems fairly determined that the s3 host name is http://s3.amazonaws.com, whereas I need to specify an alternative host name for a compatible s3 store that we run internally.
@kjothen It isn’t currently possible to specify a non-s3 but s3-compatible endpoint for log rotation I’d recommend that you request it as a feature in the customer feedback portal (Suggest Features link in the top nav of my.datomic dashboard)
@marshall I figured this was the case, but thought I'd check nonetheless. AWS is not an option at my workplace just now, but figured I could take advantage of our internal S3 store for backups in particular. I'll raise some feedback - thanks!
@kjothen yep, totally understand the desire/feature - definitely think it’s one to put on the portal
@marshall I followed your suggestion and raised the feature in the portal, thanks again for your prompt response
@marshall have any of the portal requests become released features yet?