This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-08
Channels
- # aws-lambda (2)
- # beginners (66)
- # calva (7)
- # cider (1)
- # clj-kondo (1)
- # cljs-dev (4)
- # cljsrn (2)
- # clojure (79)
- # clojure-android (1)
- # clojure-spec (8)
- # clojure-sweden (3)
- # clojure-uk (12)
- # clojurescript (6)
- # datomic (18)
- # duct (1)
- # emacs (31)
- # fulcro (8)
- # hoplon (5)
- # joker (4)
- # luminus (9)
- # off-topic (7)
- # reagent (6)
- # rewrite-clj (8)
- # shadow-cljs (9)
- # spacemacs (42)
- # tools-deps (9)
- # yada (4)
Hi, I’m looking to be able to synchronize cloud to dev-prem. How can I do this? Has anyone done it before?
I am curious about installing a transaction function on my in memory test database. I think this is same proceedure as on-prem documentation which says to install like this
;; tx-data to install the function
[{:db/ident :add-doc
:db/fn #db/fn {:lang "clojure"
:params [db e doc]
:code [[:db/add e :db/doc doc]]}
but i already have the code setup in a function somewhere like my.package/my-function
so i am curious how to install it ..
i am trying things like
(d/transact conn {:tx-data [{:db/ident :my-function
:db/fn `my.package/my-function}]})
but that not making datomic very happy ( says `my.package/my-function is not a valid :datomic/fn for attribute :db/fn )
also the example does not even work in the in-memory db I get error
Syntax error compiling fn* at (middleware_test.clj:13:1).
Can't embed object in code, maybe print-dup not defined: clojure.lang.Delay@3151d7b9
when i do this
(d/transact conn
{:tx-data [{:db/ident :add-doc
:db/fn #db/fn {:lang "clojure"
:params [db e doc]
:code [[:db/add e :db/doc doc]]}}]})
Trying out datomic cloud for the first time and noticed that there’s not a connection shutdown function the same way there is in the on-prem version of datomic. I assume then that there’s no cleanup that needs to be done when I’m ready to shut down my client/system?
In the tutorial it says:
(def items-by-type-ionized
"Ionization of items-by-type for use with AWS API Gateway lambda
proxy integration."
(apigw/ionize items-by-type))
What does 'ionize' mean in this context?API Gateway passes the request to and expects a response from the application in a specific json format. I think it’s describe here, but I might be wrong: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html#api-gateway-simple-proxy-for-lambda-input-format The handler function in your app adheres to the clojure ring spec. The ionize function takes care of the conversions to make those two things compatible. It’s probably just a lot of boring code filled with map key renaming and type conversion…