Fork me on GitHub
#datomic
<
2016-09-05
>
grav10:09:33

Hey! How can I find the type of stuff in my schema?

'[:find ?ident ?v
         :in $
         :where
         [?e :db/ident ?ident]
         [?e :db/valueType ?v]
         [_ :db.install/attribute ?e]]
This gives me eg [[:foo/bar 23] [:foo/baz 22]], so I somehow need to resolve these numbers to a type, eg. 23 -> :db.type/string

drankard11:09:59

Hi there. Im using local cassandra storage, now i try to setup Cloudwatch metrics in aws, following doc: http://docs.datomic.com/aws.html#other-storages. It works perfectly, if running it all with direct internet access, i se metrics comming. But if i start up behind my coorporate proxy i get "Connect to http://my-metrics.s3.amazonaws.com:443 timed out" when starting the transactor. The proxy grants access to aws, If i curl with HTTPS_PROXY, everyting is fine. Im starting the transactor with -Dhttps.proxyHost=my-proxy-host -Dhttps.proxyPort=8080 like any other Java application, but it seems like the transactor ignores the options. HTTPS_PROXY or https_proxy env vars is ignorred to. Any ideas ?

grav11:09:35

To answer my own question: I just needed to add [?v :db/ident ?t]

grav12:09:06

So

'[:find ?ident ?t
         :in $
         :where
         [?e :db/ident ?ident]
         [?e :db/valueType ?v]
         [?v :db/ident ?t
         [_ :db.install/attribute ?e]]

robert-stuttaford13:09:56

right, @grav. and you don't need the db.install clause at all

robert-stuttaford13:09:11

assuming ?ident is a schema attr, it'll work just as well