(lineage query)
Returns a sequence of the columns used in / referenced by the query
Returns a sequence of the columns used in / referenced by the query
(parsed-query query)
Main entry point: takes a string query and returns a Statement
object that can be handled by the other functions.
Main entry point: takes a string query and returns a `Statement` object that can be handled by the other functions.
(query->components parsed-query)
Given a parsed query (i.e., a [subclass of] Statement
) return a map with the :tables
and :columns
found within it.
(Specifically, it returns their fully-qualified names as strings, where 'fully-qualified' means 'as referred to in the query'; this function doesn't do additional inference work to find out a table's schema.)
Given a parsed query (i.e., a [subclass of] `Statement`) return a map with the `:tables` and `:columns` found within it. (Specifically, it returns their fully-qualified names as strings, where 'fully-qualified' means 'as referred to in the query'; this function doesn't do additional inference work to find out a table's schema.)
(replace-names sql renames)
Given a SQL query, apply the given table and column renames.
Given a SQL query, apply the given table and column renames.
(resolve-columns tables columns)
TODO: Make this use metadata we know about. TODO: If nil is a column (from a select *) then no need for the rest of the entries TODO: might want to live in another ns
TODO: Make this use metadata we know about. TODO: If nil is a column (from a select *) then no need for the rest of the entries TODO: might want to live in another ns
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close