This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-04
Channels
- # announcements (25)
- # babashka (7)
- # beginners (52)
- # calva (29)
- # clara (1)
- # clj-kondo (4)
- # cljs-dev (55)
- # clojure (86)
- # clojure-europe (5)
- # clojure-finland (1)
- # clojure-france (1)
- # clojure-italy (1)
- # clojure-nl (1)
- # clojure-uk (57)
- # clojurescript (33)
- # conjure (107)
- # cursive (20)
- # datomic (37)
- # emacs (23)
- # events (13)
- # fulcro (67)
- # helix (73)
- # jobs-discuss (22)
- # lambdaisland (1)
- # leiningen (32)
- # malli (2)
- # meander (9)
- # mid-cities-meetup (1)
- # observability (1)
- # off-topic (14)
- # overtone (3)
- # pathom (39)
- # re-frame (22)
- # reagent (13)
- # reitit (13)
- # shadow-cljs (52)
- # sql (15)
- # tools-deps (29)
- # vim (11)
how do you mean? do you want Ions to act as a web server and serve the static frontend from somewhere like S3?
@U1RCQD0UE Put that static frontend spa in an S3 bucket which is cached by cloudfront. Then set up a codebuild/codepipeline job any time it changes and be sure to do a cloudfront cache invalidation on every successful build.
I was wondering if I had to add something extra like Serverless Framework to deploy an SPA frontend
is there a way to query for the inclusion of a value anywhere in a tuple attribute? something like:
(d/q '{:find [?social-connection]
:in [$ ?person]
:where [
[?social-connection :friendship/from+to ?person]
]}
db "Bob")
i guess i could wrote a more sophisticated query to identify the attributes in the tuple attribute and check each one
yeah, that's brilliant @U09R86PA4. thanks for pointing that out -- it's exactly what i needed.
definitely. as my business entities and tuple constraints grow, i find now and again that when an entity is retracted, it produces a tuple somewhere else with a nil value (metaphorically). then, retracting another entity that shared common values in the remainder of the tuple fails due to conflicting datoms.
two existing tuple entities: [friend-a friend-c] [friend-b friend-c] retract friend-a: [nil friend-c] [friend-b friend-c] retract friend-b and fail: [nil friend-c] [nil friend-c]
is working around the issue something you've experienced? i've toyed with inbound component references (but this feels dirty and difficult to manage), or transactor functions to look for tuples, or an API to handle retracting known related tuples.
if the index exists just to ensure uniqueness, consider enforcing uniqueness on write with a :db/ensure function
I don’t think this can be done with a tx fn because you need to know the final value of the tuple after all primitive datom operations are applied
also we're in the same place: use caution. but that comes with a lot of insider knowledge for new engineers to pick up before they start working with the data, because they have to know how all existing tuples connect the data model.
Is there any way to load a database backup from disk into an in-memory datomic database? If not, what is the standard for datomic tests that reach a database?
generally test fixtures will create an in-memory database and get it into the state being tested
if you want to start from a database you have already, you can use it as a dev db; but make sure you don’t write to it
Created a little script for deploying ions without the ceremony in case any one one here could use it: https://gist.github.com/mrapogee/251a6b279f1224b90698676f842aaa74
Nice. There is a case macro that can simplify your cond.