This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-26
Channels
- # aleph (3)
- # beginners (98)
- # boot (24)
- # cljs-dev (13)
- # cljsrn (16)
- # clojure (97)
- # clojure-dusseldorf (2)
- # clojure-italy (2)
- # clojure-losangeles (2)
- # clojure-russia (48)
- # clojure-spec (28)
- # clojure-uk (79)
- # clojurescript (79)
- # community-development (2)
- # cursive (4)
- # datomic (35)
- # duct (1)
- # events (1)
- # fulcro (43)
- # heroku (1)
- # jobs (1)
- # lein-figwheel (2)
- # luminus (1)
- # lumo (12)
- # nyc (1)
- # off-topic (6)
- # om (1)
- # pedestal (7)
- # portkey (9)
- # proton (1)
- # re-frame (45)
- # reagent (27)
- # rum (2)
- # shadow-cljs (78)
- # spacemacs (3)
- # specter (2)
- # testing (2)
- # vim (41)
is there a way to use datomic/entity and add additional computed data on the “map”? We noticed that assoc
throws. We can merge a new map with the attributes with the entity but then we lose the laziness that datomic/entity provides.
@hmaurer @dominicm @benha thanks for the tips regarding the invitation code generation
@mkvlr you could reify IAssoc to allow local assoc calls, but pass through gets to underlying EntityMap
any other best practices to add computed data to an entity? Not put it on the entity at all but use another thing?
what if I touch the entity, will I still be able to lazily load relations reachable from it?
> Touches all of the attributes of the entity, including any component entities recursively.
I am new to Datomic too so I am just trying things out, but it looks like (into {} your-entity)
will return a PersistentArrayMap at the top level, but leave EntityMaps for nested entities (which are lazy)
@favila yes, I realized my mistake, thanks!
@favila do you know if datomic will attempt to optimise queries, and if yes, how? e.g. are clauses re-ordered on datalog queries?
Datomic does some optimizations, but clause reordering is not one of them. I think they may never add that optimization for philosophical reasons
is anyone familiar with this stack trace, and what the cause might be? I see it when I transact my schema using datomic.api
11:16:24 ERROR nREPL-worker-0 core.client AMQ214016: Failed to create netty connection
java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Net.java:101)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:622)
at io.netty.channel.socket.nio.NioSocketChannel.doConnect(NioSocketChannel.java:208)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.connect(AbstractNioChannel.java:203)
at io.netty.channel.DefaultChannelPipeline$HeadContext.connect(DefaultChannelPipeline.java:1226)
at io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:549)
at io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:534)
at io.netty.handler.ssl.SslHandler.connect(SslHandler.java:438)
at io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:549)
at io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:534)
at io.netty.channel.ChannelDuplexHandler.connect(ChannelDuplexHandler.java:50)
at io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:549)
at io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:534)
at io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:516)
at io.netty.channel.DefaultChannelPipeline.connect(DefaultChannelPipeline.java:970)
at io.netty.channel.AbstractChannel.connect(AbstractChannel.java:215)
at io.netty.bootstrap.Bootstrap$2.run(Bootstrap.java:166)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:408)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:402)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
at java.lang.Thread.run(Thread.java:745)
yes, datomic.api
. it's coming from ActiveMQ, there should be no hostname resolution required for the transaction (uri is DDB which looks up the transactor IP in Dynamo)
does anyone know if the :string
type for an attribute has any sort of character limit? I cannot seem to find anything in the documentation that would suggest there is.
Thanks
@phillipc AFAIK no intrinsic limit. you will probably run into platform limits first (e.g. string too long for java or fressian)
consider writing a uuid-named file to a blob store (e.g. s3) and storing the reference in the db as the value