diff --git a/CHANGELOG.md b/CHANGELOG.md index 18e337a..b86d157 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Only accretive/fixative changes will be made from now on. * 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. + * Fix `:unit_count` references in **Getting Started** (were `:unit_cost`). * Update `test-runner`. * 1.2.659 -- 2021-05-05 diff --git a/doc/getting-started.md b/doc/getting-started.md index d9e41b9..f7afb23 100644 --- a/doc/getting-started.md +++ b/doc/getting-started.md @@ -243,18 +243,18 @@ If you wish to create a Clojure hash map that supports that lazy navigation, you ```clojure ;; selects specific keys (as simple keywords): 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])) ;; selects specific keys (as qualified keywords): user=> (into [] (map #(select-keys % [:invoice/id :invoice/product - :invoice/unit_price :invoice/unit_cost + :invoice/unit_price :invoice/unit_count :invoice/customer_id])) (jdbc/plan ds ["select * from invoice where customer_id = ?" 100])) ;; selects specific keys (as qualified keywords -- ignoring the table name): user=> (into [] (map #(select-keys % [:foo/id :bar/product - :quux/unit_price :wibble/unit_cost + :quux/unit_price :wibble/unit_count :blah/customer_id])) (jdbc/plan ds ["select * from invoice where customer_id = ?" 100])) ;; do not do this: @@ -338,34 +338,34 @@ user=> (plan/select! ds #{"apple" "banana" "cucumber"} ;; selects specific keys (as simple keywords): 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])) ;; or: 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]) ;; selects specific keys (as qualified keywords): user=> (into [] (map #(select-keys % [:invoice/id :invoice/product - :invoice/unit_price :invoice/unit_cost + :invoice/unit_price :invoice/unit_count :invoice/customer_id])) (jdbc/plan ds ["select * from invoice where customer_id = ?" 100])) ;; or: user=> (plan/select! ds [:invoice/id :invoice/product - :invoice/unit_price :invoice/unit_cost + :invoice/unit_price :invoice/unit_count :invoice/customer_id] ["select * from invoice where customer_id = ?" 100]) ;; selects specific keys (as qualified keywords -- ignoring the table name): user=> (into [] (map #(select-keys % [:foo/id :bar/product - :quux/unit_price :wibble/unit_cost + :quux/unit_price :wibble/unit_count :blah/customer_id])) (jdbc/plan ds ["select * from invoice where customer_id = ?" 100])) ;; or: user=> (plan/select! ds [:foo/id :bar/product - :quux/unit_price :wibble/unit_cost + :quux/unit_price :wibble/unit_count :blah/customer_id] ["select * from invoice where customer_id = ?" 100]) ```