Fix typos in Getting Started
This commit is contained in:
parent
aea0d1d22f
commit
8d02bd68f0
2 changed files with 10 additions and 9 deletions
|
|
@ -4,6 +4,7 @@ Only accretive/fixative changes will be made from now on.
|
||||||
|
|
||||||
* 1.2.next in progress
|
* 1.2.next in progress
|
||||||
* _[Experimental! Will change in response to feedback!]_ Add `next.jdbc/with-logging` to create a wrapped connectable that will invoke logging functions with the SQL/parameters and optionally the result for each operation.
|
* _[Experimental! Will change in response to feedback!]_ Add `next.jdbc/with-logging` to create a wrapped connectable that will invoke logging functions with the SQL/parameters and optionally the result for each operation.
|
||||||
|
* Fix `:unit_count` references in **Getting Started** (were `:unit_cost`).
|
||||||
* Update `test-runner`.
|
* Update `test-runner`.
|
||||||
|
|
||||||
* 1.2.659 -- 2021-05-05
|
* 1.2.659 -- 2021-05-05
|
||||||
|
|
|
||||||
|
|
@ -243,18 +243,18 @@ If you wish to create a Clojure hash map that supports that lazy navigation, you
|
||||||
```clojure
|
```clojure
|
||||||
;; selects specific keys (as simple keywords):
|
;; selects specific keys (as simple keywords):
|
||||||
user=> (into []
|
user=> (into []
|
||||||
(map #(select-keys % [:id :product :unit_price :unit_cost :customer_id]))
|
(map #(select-keys % [:id :product :unit_price :unit_count :customer_id]))
|
||||||
(jdbc/plan ds ["select * from invoice where customer_id = ?" 100]))
|
(jdbc/plan ds ["select * from invoice where customer_id = ?" 100]))
|
||||||
;; selects specific keys (as qualified keywords):
|
;; selects specific keys (as qualified keywords):
|
||||||
user=> (into []
|
user=> (into []
|
||||||
(map #(select-keys % [:invoice/id :invoice/product
|
(map #(select-keys % [:invoice/id :invoice/product
|
||||||
:invoice/unit_price :invoice/unit_cost
|
:invoice/unit_price :invoice/unit_count
|
||||||
:invoice/customer_id]))
|
:invoice/customer_id]))
|
||||||
(jdbc/plan ds ["select * from invoice where customer_id = ?" 100]))
|
(jdbc/plan ds ["select * from invoice where customer_id = ?" 100]))
|
||||||
;; selects specific keys (as qualified keywords -- ignoring the table name):
|
;; selects specific keys (as qualified keywords -- ignoring the table name):
|
||||||
user=> (into []
|
user=> (into []
|
||||||
(map #(select-keys % [:foo/id :bar/product
|
(map #(select-keys % [:foo/id :bar/product
|
||||||
:quux/unit_price :wibble/unit_cost
|
:quux/unit_price :wibble/unit_count
|
||||||
:blah/customer_id]))
|
:blah/customer_id]))
|
||||||
(jdbc/plan ds ["select * from invoice where customer_id = ?" 100]))
|
(jdbc/plan ds ["select * from invoice where customer_id = ?" 100]))
|
||||||
;; do not do this:
|
;; do not do this:
|
||||||
|
|
@ -338,34 +338,34 @@ user=> (plan/select! ds
|
||||||
#{"apple" "banana" "cucumber"}
|
#{"apple" "banana" "cucumber"}
|
||||||
;; selects specific keys (as simple keywords):
|
;; selects specific keys (as simple keywords):
|
||||||
user=> (into []
|
user=> (into []
|
||||||
(map #(select-keys % [:id :product :unit_price :unit_cost :customer_id]))
|
(map #(select-keys % [:id :product :unit_price :unit_count :customer_id]))
|
||||||
(jdbc/plan ds ["select * from invoice where customer_id = ?" 100]))
|
(jdbc/plan ds ["select * from invoice where customer_id = ?" 100]))
|
||||||
;; or:
|
;; or:
|
||||||
user=> (plan/select! ds
|
user=> (plan/select! ds
|
||||||
[:id :product :unit_price :unit_cost :customer_id]
|
[:id :product :unit_price :unit_count :customer_id]
|
||||||
["select * from invoice where customer_id = ?" 100])
|
["select * from invoice where customer_id = ?" 100])
|
||||||
;; selects specific keys (as qualified keywords):
|
;; selects specific keys (as qualified keywords):
|
||||||
user=> (into []
|
user=> (into []
|
||||||
(map #(select-keys % [:invoice/id :invoice/product
|
(map #(select-keys % [:invoice/id :invoice/product
|
||||||
:invoice/unit_price :invoice/unit_cost
|
:invoice/unit_price :invoice/unit_count
|
||||||
:invoice/customer_id]))
|
:invoice/customer_id]))
|
||||||
(jdbc/plan ds ["select * from invoice where customer_id = ?" 100]))
|
(jdbc/plan ds ["select * from invoice where customer_id = ?" 100]))
|
||||||
;; or:
|
;; or:
|
||||||
user=> (plan/select! ds
|
user=> (plan/select! ds
|
||||||
[:invoice/id :invoice/product
|
[:invoice/id :invoice/product
|
||||||
:invoice/unit_price :invoice/unit_cost
|
:invoice/unit_price :invoice/unit_count
|
||||||
:invoice/customer_id]
|
:invoice/customer_id]
|
||||||
["select * from invoice where customer_id = ?" 100])
|
["select * from invoice where customer_id = ?" 100])
|
||||||
;; selects specific keys (as qualified keywords -- ignoring the table name):
|
;; selects specific keys (as qualified keywords -- ignoring the table name):
|
||||||
user=> (into []
|
user=> (into []
|
||||||
(map #(select-keys % [:foo/id :bar/product
|
(map #(select-keys % [:foo/id :bar/product
|
||||||
:quux/unit_price :wibble/unit_cost
|
:quux/unit_price :wibble/unit_count
|
||||||
:blah/customer_id]))
|
:blah/customer_id]))
|
||||||
(jdbc/plan ds ["select * from invoice where customer_id = ?" 100]))
|
(jdbc/plan ds ["select * from invoice where customer_id = ?" 100]))
|
||||||
;; or:
|
;; or:
|
||||||
user=> (plan/select! ds
|
user=> (plan/select! ds
|
||||||
[:foo/id :bar/product
|
[:foo/id :bar/product
|
||||||
:quux/unit_price :wibble/unit_cost
|
:quux/unit_price :wibble/unit_count
|
||||||
:blah/customer_id]
|
:blah/customer_id]
|
||||||
["select * from invoice where customer_id = ?" 100])
|
["select * from invoice where customer_id = ?" 100])
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue