Default SQL Server DB is model
Also update branch references.
This commit is contained in:
parent
4045e18f3e
commit
aec0693b14
5 changed files with 6 additions and 6 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
Only accretive/fixative changes will be made from now on.
|
Only accretive/fixative changes will be made from now on.
|
||||||
|
|
||||||
Changes made on master since 1.0.462:
|
Changes made on develop since 1.0.462:
|
||||||
* Add tests for `"jtds"` database driver (against MS SQL Server), making it officially supported.
|
* Add tests for `"jtds"` database driver (against MS SQL Server), making it officially supported.
|
||||||
* Switch from OpenTable Embedded PostgreSQL to Zonky's version, so that testing can move forward from PostgreSQL 10.11 to 12.2.0.
|
* Switch from OpenTable Embedded PostgreSQL to Zonky's version, so that testing can move forward from PostgreSQL 10.11 to 12.2.0.
|
||||||
* Fix potential reflection warnings caused by `next.jdbc.prepare/statement` being incorrectly type-hinted.
|
* Fix potential reflection warnings caused by `next.jdbc.prepare/statement` being incorrectly type-hinted.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# next.jdbc [](https://circleci.com/gh/seancorfield/next-jdbc/tree/master)
|
# next.jdbc [](https://circleci.com/gh/seancorfield/next-jdbc/tree/develop)
|
||||||
|
|
||||||
The next generation of `clojure.java.jdbc`: a new low-level Clojure wrapper for JDBC-based access to databases.
|
The next generation of `clojure.java.jdbc`: a new low-level Clojure wrapper for JDBC-based access to databases.
|
||||||
|
|
||||||
|
|
@ -14,7 +14,7 @@ The documentation on [cljdoc.org](https://cljdoc.org/d/seancorfield/next.jdbc/CU
|
||||||
* [Migrating from `clojure.java.jdbc`](https://cljdoc.org/d/seancorfield/next.jdbc/CURRENT/doc/migration-from-clojure-java-jdbc)
|
* [Migrating from `clojure.java.jdbc`](https://cljdoc.org/d/seancorfield/next.jdbc/CURRENT/doc/migration-from-clojure-java-jdbc)
|
||||||
* Feedback via [issues](https://github.com/seancorfield/next-jdbc/issues) or in the [`#sql` channel on the Clojurians Slack](https://clojurians.slack.com/messages/C1Q164V29/details/) or the [`#sql` stream on the Clojurians Zulip](https://clojurians.zulipchat.com/#narrow/stream/152063-sql).
|
* Feedback via [issues](https://github.com/seancorfield/next-jdbc/issues) or in the [`#sql` channel on the Clojurians Slack](https://clojurians.slack.com/messages/C1Q164V29/details/) or the [`#sql` stream on the Clojurians Zulip](https://clojurians.zulipchat.com/#narrow/stream/152063-sql).
|
||||||
|
|
||||||
The documentation on GitHub is for **master** since the 1.0.462 release -- [see the CHANGELOG](https://github.com/seancorfield/next-jdbc/blob/master/CHANGELOG.md) and then read the [corresponding updated documentation](https://github.com/seancorfield/next-jdbc/tree/master/doc) on GitHub if you want.
|
The documentation on GitHub is for **develop** since the 1.0.462 release -- [see the CHANGELOG](https://github.com/seancorfield/next-jdbc/blob/develop/CHANGELOG.md) and then read the [corresponding updated documentation](https://github.com/seancorfield/next-jdbc/tree/develop/doc) on GitHub if you want.
|
||||||
|
|
||||||
This project follows the version scheme MAJOR.MINOR.COMMITS where MAJOR and MINOR provide some relative indication of the size of the change, but do not follow semantic versioning. In general, all changes endeavor to be non-breaking (by moving to new names rather than by breaking existing names). COMMITS is an ever-increasing counter of commits since the beginning of this repository.
|
This project follows the version scheme MAJOR.MINOR.COMMITS where MAJOR and MINOR provide some relative indication of the size of the change, but do not follow semantic versioning. In general, all changes endeavor to be non-breaking (by moving to new names rather than by breaking existing names). COMMITS is an ever-increasing counter of commits since the beginning of this repository.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ for `deps.edn` or:
|
||||||
```
|
```
|
||||||
for `project.clj` or `build.boot`.
|
for `project.clj` or `build.boot`.
|
||||||
|
|
||||||
**In addition, you will need to add dependencies for the JDBC drivers you wish to use for whatever databases you are using.** You can see the drivers and versions that `next.jdbc` is tested against in [the project's `deps.edn` file](https://github.com/seancorfield/next-jdbc/blob/master/deps.edn#L10-L25), but many other JDBC drivers for other databases should also work (e.g., Oracle, Red Shift).
|
**In addition, you will need to add dependencies for the JDBC drivers you wish to use for whatever databases you are using.** You can see the drivers and versions that `next.jdbc` is tested against in [the project's `deps.edn` file](https://github.com/seancorfield/next-jdbc/blob/develop/deps.edn#L10-L27), but many other JDBC drivers for other databases should also work (e.g., Oracle, Red Shift).
|
||||||
|
|
||||||
## An Example REPL Session
|
## An Example REPL Session
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ Only `execute!` expects this protocol to be implemented. `execute-one!` and `pla
|
||||||
|
|
||||||
The `as-*` functions described above are all implemented in terms of these protocols. They are passed the `ResultSet` object and the options hash map (as passed into various `next.jdbc` functions). They return an implementation of the protocols that is then used to build rows and the result set. Note that the `ResultSet` passed in is _mutable_ and is advanced from row to row by the SQL execution function, so each time `->row` is called, the underlying `ResultSet` object points at each new row in turn. By contrast, `->rs` (which is only called by `execute!`) is invoked _before_ the `ResultSet` is advanced to the first row.
|
The `as-*` functions described above are all implemented in terms of these protocols. They are passed the `ResultSet` object and the options hash map (as passed into various `next.jdbc` functions). They return an implementation of the protocols that is then used to build rows and the result set. Note that the `ResultSet` passed in is _mutable_ and is advanced from row to row by the SQL execution function, so each time `->row` is called, the underlying `ResultSet` object points at each new row in turn. By contrast, `->rs` (which is only called by `execute!`) is invoked _before_ the `ResultSet` is advanced to the first row.
|
||||||
|
|
||||||
The options hash map for any `next.jdbc` function can contain a `:builder-fn` key and the value is used as the row/result set builder function. The tests for `next.jdbc.result-set` include a [record-based builder function](https://github.com/seancorfield/next-jdbc/blob/master/test/next/jdbc/result_set_test.clj#L335-L353) as an example of how you can extend this to satisfy your needs.
|
The options hash map for any `next.jdbc` function can contain a `:builder-fn` key and the value is used as the row/result set builder function. The tests for `next.jdbc.result-set` include a [record-based builder function](https://github.com/seancorfield/next-jdbc/blob/develop/test/next/jdbc/result_set_test.clj#L335-L353) as an example of how you can extend this to satisfy your needs.
|
||||||
|
|
||||||
> Note: When `next.jdbc` cannot obtain a `ResultSet` object and returns `{:next.jdbc/count N}` instead, the builder function is not applied -- the `:builder-fn` option does not affect the shape of the result.
|
> Note: When `next.jdbc` cannot obtain a `ResultSet` object and returns `{:next.jdbc/count N}` instead, the builder function is not applied -- the `:builder-fn` option does not affect the shape of the result.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ Examples:
|
||||||
;; socketTimeout via JDBC URL:
|
;; socketTimeout via JDBC URL:
|
||||||
(def db-url (str "jdbc:sqlserver://localhost;user=sa;password=secret"
|
(def db-url (str "jdbc:sqlserver://localhost;user=sa;password=secret"
|
||||||
;; milliseconds:
|
;; milliseconds:
|
||||||
";database=master;socketTimeout=10000"))
|
";database=model;socketTimeout=10000"))
|
||||||
|
|
||||||
;; loginTimeout via DataSource:
|
;; loginTimeout via DataSource:
|
||||||
(def ds (jdbc/get-datasource db-spec))
|
(def ds (jdbc/get-datasource db-spec))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue