This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-27
Channels
- # admin-announcements (3)
- # beginners (26)
- # boot (12)
- # cider (1)
- # cljs-dev (13)
- # cljsjs (101)
- # cljsrn (5)
- # clojure (64)
- # clojure-android (1)
- # clojure-gamedev (1)
- # clojure-greece (23)
- # clojure-nl (9)
- # clojure-poland (2)
- # clojure-russia (3)
- # clojure-spec (11)
- # clojure-uk (159)
- # clojurescript (19)
- # component (1)
- # core-async (2)
- # cursive (2)
- # datascript (1)
- # datomic (2)
- # devcards (1)
- # events (1)
- # funcool (1)
- # hispano (1)
- # hoplon (24)
- # immutant (12)
- # jobs (1)
- # keechma (18)
- # lein-figwheel (2)
- # leiningen (2)
- # off-topic (8)
- # om (23)
- # onyx (4)
- # planck (26)
- # re-frame (149)
- # reagent (6)
- # ring-swagger (9)
- # spacemacs (1)
- # specter (33)
- # spirituality-ethics (11)
- # testing (10)
- # untangled (335)
- # utah-clojurians (3)
- # vim (3)
- # yada (46)
I haven’t seen any non trivial remote parser examples that handle queries with more than a flat request. A non-datmoic db example would also be helpful. Any such examples?
@nxqd: lets say I have 2 components, OrgsList which has many OrgCard children. OrgCard wants [:id :name]
from orgs collection, and also [:id :name]
of the org’s projects, where a project belongs to an org. How should the OrgCard query look, and how should it be handled on the server?
you can construct sql query from om.next query to get the selected fields. Is this clear to you ?
constructing the db query is fine, i guess what’s unclear is parsing the ast query when it gets to the server, do you hard code to always look for “joins” such as projects in this case or is the read supposed to be generic to handle different queries (say one without projects, or with a different relation), also do you return projects nested under the orgs or as flat map with :orgs and :projects keys
parser on backend will be the same as frontend, it will handle keyed query like one on frontend. When you return result, just return in {:value ..}
like in frontend, om next will gather all those information and return data as a tree like one in frontend.
https://juxt.pro/blog/posts/course-notes-2.html this may help with SQL. @nxqd could probably guide better on what it says though.
Just pushed Compassus 0.2.0 to Clojars. Notable changes from 0.1.0 are published here: https://github.com/anmonteiro/compassus/blob/master/CHANGELOG.md#020-2016-06-27
how do I run the tests for the om library itself?
(require ‘om.next.tests)
(in-ns ‘om.next.tests)
(run-tests)
at the figwheel or node repl
@anmonteiro: thanks
@wilkerlucio: I saw your PRs but I noticed you have not sent me a CA want to PM your email?
@dnolen: yes please
@wilkerlucio: ok direct message me the email you want me to use
@wilkerlucio: PR merged thanks much
@ag: Check out https://github.com/anmonteiro/compassus#integrating-with-browser-history - does that give you a place to start?
@shaun-mahood: oh, wow.. it seems to be exactly what I was looking for.. great, thanks!