Liking cljdoc? Tell your friends :D

macaw.core


parsed-queryclj

(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.
sourceraw docstring

query->componentsclj

(query->components statement & {:as opts})

Given a parsed query (i.e., a [subclass of] Statement) return a map with the elements 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 elements 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.)
sourceraw docstring

replace-namesclj

(replace-names sql renames & {:as opts})

Given an SQL query, apply the given table, column, and schema renames.

Supported options:

  • case-insensitive: whether to relax the comparison

    • :upper - identifiers are implicitly case to uppercase, as per the SQL-92 standard.
    • :lower - identifiers are implicitly cast to lowercase, as per Postgres et al.
    • :agnostic - case is ignored when comparing identifiers in code to replacement "from" strings.
  • quotes-preserve-case: whether quoted identifiers should override the previous option.

Given an SQL query, apply the given table, column, and schema renames.

Supported options:

- case-insensitive: whether to relax the comparison
  - :upper    - identifiers are implicitly case to uppercase, as per the SQL-92 standard.
  - :lower    - identifiers are implicitly cast to lowercase, as per Postgres et al.
  - :agnostic - case is ignored when comparing identifiers in code to replacement "from" strings.

- quotes-preserve-case: whether quoted identifiers should override the previous option.
sourceraw docstring

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

× close