update list of visualization tools
This commit is contained in:
parent
70f1eaaf77
commit
b76b60d964
3 changed files with 6 additions and 4 deletions
|
|
@ -47,7 +47,7 @@ From a `DataSource`, either you or `next.jdbc` can create a `java.sql.Connection
|
|||
|
||||
The primary SQL execution API in `next.jdbc` is:
|
||||
* `plan` -- yields an `IReduceInit` that, when reduced, executes the SQL statement and then reduces over the `ResultSet` with as little overhead as possible.
|
||||
* `execute!` -- executes the SQL statement and produces a vector of realized hash maps, that use qualified keywords for the column names, of the form `:<table>/<column>`. If you join across multiple tables, the qualified keywords will reflect the originating tables for each of the columns. If the SQL produces named values that do not come from an associated table, a simple, unqualified keyword will be used. The realized hash maps returned by `execute!` are `Datafiable` and thus `Navigable` (see Clojure 1.10's `datafy` and `nav` functions, and tools like Cognitect's REBL). Alternatively, you can specify `{:builder-fn rs/as-arrays}` and produce a vector with column names followed by vectors of row values. `rs/as-maps` is the default for `:builder-fn` but there are also `rs/as-unqualified-maps` and `rs/as-unqualified-arrays` if you want unqualified `:<column>` column names (and there are also lower-case variants of all of these).
|
||||
* `execute!` -- executes the SQL statement and produces a vector of realized hash maps, that use qualified keywords for the column names, of the form `:<table>/<column>`. If you join across multiple tables, the qualified keywords will reflect the originating tables for each of the columns. If the SQL produces named values that do not come from an associated table, a simple, unqualified keyword will be used. The realized hash maps returned by `execute!` are `Datafiable` and thus `Navigable` (see Clojure 1.10's `datafy` and `nav` functions, and tools like [Portal](https://github.com/djblue/portal), [Reveal](https://github.com/vlaaad/reveal), and Cognitect's REBL). Alternatively, you can specify `{:builder-fn rs/as-arrays}` and produce a vector with column names followed by vectors of row values. `rs/as-maps` is the default for `:builder-fn` but there are also `rs/as-unqualified-maps` and `rs/as-unqualified-arrays` if you want unqualified `:<column>` column names (and there are also lower-case variants of all of these).
|
||||
* `execute-one!` -- executes the SQL or DDL statement and produces a single realized hash map. The realized hash map returned by `execute-one!` is `Datafiable` and thus `Navigable`.
|
||||
|
||||
In addition, there are API functions to create `PreparedStatement`s (`prepare`) from `Connection`s, which can be passed to `plan`, `execute!`, or `execute-one!`, and to run code inside a transaction (the `transact` function and the `with-transaction` macro).
|
||||
|
|
|
|||
|
|
@ -6,13 +6,15 @@ Shortly after REBL's release, I added experimental support to `clojure.java.jdbc
|
|||
|
||||
In addition to `datafy` and `nav` support in the result sets, as of version 1.0.462, there is a `next.jdbc.datafy` namespace that can be required to extend these protocols to a number of JDBC object types. See **JDBC Datafication** near the end of this page for more detail of this.
|
||||
|
||||
Additional tools that understand `datafy` and `nav` include [Portal](https://github.com/djblue/portal) and [Reveal](https://github.com/vlaaad/reveal).
|
||||
|
||||
## The `datafy`/`nav` Lifecycle on Result Sets
|
||||
|
||||
Here's how the process works, for result sets produced by `next.jdbc`:
|
||||
|
||||
* `execute!` and `execute-one!` produce result sets containing rows that are `Datafiable`,
|
||||
* Tools like REBL can call `datafy` on result sets to render them as "pure data" (which they already are, but this makes them also `Navigable`),
|
||||
* Tools like REBL allow users to "drill down" into elements of rows in the "pure data" result set, using `nav`,
|
||||
* Tools like Portal, Reveal, and REBL can call `datafy` on result sets to render them as "pure data" (which they already are, but this makes them also `Navigable`),
|
||||
* Tools like Portal, Reveal, and REBL allow users to "drill down" into elements of rows in the "pure data" result set, using `nav`,
|
||||
* If a column in a row represents a foreign key into another table, calling `nav` will fetch the related row(s),
|
||||
* Those can in turn be `datafy`'d and `nav`'d to continue drilling down through connected data in the database.
|
||||
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ CREATE PROCEDURE FRUITP" (cond (hsqldb?) "() READS SQL DATA DYNAMIC RESULT SETS
|
|||
;; this is a convenience to bring next.jdbc's test dependencies
|
||||
;; into any REPL that has the add-lib3 branch of tools.deps.alpha
|
||||
;; which allows me to develop and test next.jdbc inside my work's
|
||||
;; "everything" REBL environment
|
||||
;; "everything" REPL environment
|
||||
(require '[clojure.tools.deps.alpha.repl :refer [add-libs]]
|
||||
'[clojure.java.io :as io]
|
||||
'[clojure.edn :as edn])
|
||||
|
|
|
|||
Loading…
Reference in a new issue