Liking cljdoc? Tell your friends :D

hara.object.query.order


first-terms-fnclj

(first-terms-fn grp)

creates a function that returns the first element of the list

((order/first-terms-fn {:first true}) [1 2 3]) => 1

creates a function that returns the first element of the list

((order/first-terms-fn {:first true}) [1 2 3])
=> 1
raw docstring

merge-terms-fnclj

(merge-terms-fn grp)

creates a function that returns the first element of the list

(-> (query/query-class (type []) ["create"]) ((order/merge-terms-fn {:merge true}))) ;;=> #[create :: ([java.util.List]), ([clojure.lang.ISeq]), ;; ([clojure.lang.IReduceInit]), ([java.lang.Object[]]), ;; ([java.lang.Iterable])]

creates a function that returns the first element of the list

(-> (query/query-class (type []) ["create"])
    ((order/merge-terms-fn {:merge true})))
;;=> #[create :: ([java.util.List]), ([clojure.lang.ISeq]),
;;               ([clojure.lang.IReduceInit]), ([java.lang.Object[]]),
;;               ([java.lang.Iterable])]
raw docstring

orderclj

(order grp eles)

formats an output for

(->> (query/query-class (type []) ["create"]) (order/order {:select-terms [:params]})) ;;=> ([java.util.List] [clojure.lang.ISeq] ;; [clojure.lang.IReduceInit] [[Ljava.lang.Object;] ;; [java.lang.Iterable])

formats an output for 

(->> (query/query-class (type []) ["create"])
     (order/order {:select-terms [:params]}))
;;=> ([java.util.List] [clojure.lang.ISeq]
;;    [clojure.lang.IReduceInit] [[Ljava.lang.Object;]
;;    [java.lang.Iterable])
raw docstring

select-terms-fnclj

(select-terms-fn grp)

creates a function that selects terms to output

(-> (query/query-class (type []) ["create"]) ((order/select-terms-fn {:select-terms [:name]}))) => ["create"]

creates a function that selects terms to output

(-> (query/query-class (type []) ["create"])
    ((order/select-terms-fn {:select-terms [:name]})))
=> ["create"]
raw docstring

sort-fnclj

(sort-fn f)

returns a function taking two inputs x and y, comparing the outputs after applying f to both

((order/sort-fn :id) {:id 1} {:id 2}) => -1

returns a function taking two inputs `x` and `y`, comparing the outputs after applying `f` to both

((order/sort-fn :id) {:id 1} {:id 2}) => -1
raw docstring

sort-terms-fnclj

(sort-terms-fn grp)

This is a little broken, it is supposed to sort on various keys, but currently only works with :name

((order/sort-terms-fn {:sort-terms nil}) [{:name 3} {:name 1} {:name 2}]) => [{:name 1} {:name 2} {:name 3}]

This is a little broken, it is supposed to sort on various keys, but currently only works with :name

((order/sort-terms-fn {:sort-terms nil})
 [{:name 3} {:name 1} {:name 2}])
=> [{:name 1} {:name 2} {:name 3}]
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close