Back

as-cols (clj)

(source)

function

(as-cols cols opts)
Given a sequence of raw column names, return a string of all the formatted column names. If a raw column name is a keyword, apply `:column-fn` to its name, from the options if present. If a raw column name is a vector pair, treat it as an expression with an alias. If the first item is a keyword, apply `:column-fn` to its name, else accept it as-is. The second item should be a keyword and that will have `:column-fn` applied to its name. This allows columns to be specified as simple names, e.g., `:foo`, as simple aliases, e.g., `[:foo :bar]`, or as expressions with an alias, e.g., `["count(*)" :total]`.

Examples