Skip to content

Instantly share code, notes, and snippets.

@dark4eg
Last active December 14, 2015 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dark4eg/41eab21daca1310744a1 to your computer and use it in GitHub Desktop.
Save dark4eg/41eab21daca1310744a1 to your computer and use it in GitHub Desktop.
static om/IQueryParams
(params [this]
{:paging-skip 0
:paging-take 10
:filter-undefined false
:filter-partials true
:filter-full true
:filter-distributor []
:filter-employeer []
:filter-outlet []
:filter-promo []
:sort-key :promo
:sort-type :asc})
static om/IQuery
(query [this]
'[:user/current
:user/children
;:employee/list
;:outlet/list
:inspection.list/outlet {:paging {:skip ?paging-skip
:take ?paging-take}
:filters {:status {:type :undefined
:value ?filter-undefined}
:partials ?filter-partials
:full ?filter-full
:outlet ?filter-outlet
:promo ?filter-promo
:employee ?filter-employeer
:distributor ?filter-distributor}
:sorting {:key ?sort-key
:type ?sort-type}}])
(defmethod readf :inspection.list/outlet
[{:keys [conn session selector query] :as env} _ params]
(println "wtf???" env _ params))
result
wtf??? {:session {:identity 17592186068149},
:conn #object[datomic.peer.Connection 0xc277e68 {:unsent-updates-queue 0,
:pending-txes 0,
:next-t 369307,
:basis-t 369305,
:index-rev 410,
:db-id st-container-7a1b72f7-bc09-41c8-97c1-b82d63a5b9d8}],
:parser #object[om.next.impl.parser$parser$self__25507 0x5eaaab65 om.next.impl.parser$parser$self__25507@5eaaab65],
:target nil, :query-root :om.next/root,
:path [],
:ast {:type :prop, :dispatch-key :inspection.list/outlet, :key :inspection.list/outlet}}
:inspection.list/outlet nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment