replace-names
now supports :schemas
in the renames map{:table "foo" :schema "bar"}
(:schema
is
present only if known) and columns {:column "foo" :table "bar" :schema "baz"}
(:table
and :schema
being
optional). So :columns
will look like that:#{{:component {:column "foo" :table "bar"} :context ["SELECT"]}}
Context is now added to each returned component in query->components
. E.g., instead of #{"foo" "bar"}
, it will
return its elements as #{{:component "foo" :context ["SELECT"]}, {:component "bar" :context ["WHERE" "SELECT"]}}
has-wildcard
now returns a set of such maps. For example:
(query->components (parsed-query "SELECT * FROM (SELECT * FROM orders) WHERE total > 10"))
; =>
{ ...
:has-wildcard?
#{{:component true, :context ["SELECT" "SUB_SELECT" "FROM" "SELECT"]}
{:component true, :context ["SELECT"]}}}
"total"
column from the WHERE
clauses is ["WHERE" "JOIN" "FROM" "SELECT"]
. The vector is arranged from most- to
least-specific. For most cases you probably only want to look at the first element and/or make assertions about the
relative order of multiple elements.Can you improve this documentation? These fine people already did:
Tim Macdonald & Alexander SolovyovEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close