Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update documentation for 0.8.0

  • Loading branch information...
commit 0f9c4cd0de1abb190678237e777fe69ac57561ee 1 parent 0ae95a5
@kumarshantanu authored
Showing with 34 additions and 8 deletions.
  1. +6 −4 CHANGES.md
  2. +28 −4 README.md
View
10 CHANGES.md
@@ -1,10 +1,12 @@
# Releas History and TODO
-## 0.8.0 / 2012-????-??
-* provide function to parse argument map from java.net.URI
-* provide function to parse argument map from String (Heroku)
-* [TODO] tests for the two above
+## 0.8.0 / 2012-August-12
+
+* Parse argument map from java.net.URI
+* Parse argument map from String (Heroku compatibility)
+* Comprehensive Oracle connection parameters
+
## 0.7.0 / 2012-July-30
View
32 README.md
@@ -10,15 +10,16 @@ The supported databases are:
* Apache Derby, Axion, HSQLDB, H2, Mckoi, SQLite
* Regular ODBC DSN, Lite ODBC DSN (eg. MS-Excel workbooks)
* CUBRID, Firebird, MySQL, MonetDB, PostgreSQL
+ * Oracle (partially tested)
* Supported but not tested
- * IBM DB2, jTDS (SQL Server, Sybase), Oracle, SapDB, SQLServer, Sybase
+ * IBM DB2, jTDS (SQL Server, Sybase), SapDB, SQLServer, Sybase
## Usage
On Clojars: https://clojars.org/clj-dbcp
-Include as a Leiningen dependency: `[clj-dbcp "0.7.0"]`.
+Include as a Leiningen dependency: `[clj-dbcp "0.8.0"]`.
The recommended way to create a datasource is to call the
`clj-dbcp.core/make-datasource` function, for example:
@@ -35,6 +36,18 @@ or,
:user :empuser :password 's3cr3t})
```
+You can also parse a database URL (Heroku style) and use to create datasource:
+
+```clojure
+(make-datasource (parse-url "postgres://foo:bar@heroku.com:5489/hellodb"))
+```
+
+or,
+
+```clojure
+(make-datasource (parse-url (System/env "DATABASE_URL")))
+```
+
Sections below describe which of the keys are applicable to various databases:
@@ -109,12 +122,23 @@ Sections below describe which of the keys are applicable to various databases:
| PostgreSQL | `:postgresql` | `:host` `:database` | `:port` |
-### Proprietary drivers, network connections
+### Proprietary Oracle drivers (default `:style` = `:system-id`)
+
+|`:style` | Required keys | Optional keys |
+|---------------|-------------------------------------|---------------|
+|`:system-id` | `:host`, `:database`/`:system-id` | `:port` |
+|`:service-name`| `:host`, `:database`/`:service-name`| `:port` |
+|`:tns-name` | `:database`/`:tns-name` | `:port` |
+|`:ldap` | `:host`, `:database`/`:system-id`/`:service-name`, `:ldap-str` | `:port` |
+|`:oci` | `:database`/`:tns-alias` | |
+|`:oci8` | `:database`/`:tns-alias` | |
+
+
+### Other proprietary drivers, network connections
| Database | `:adapter` | Required keys | Optional keys |
|------------|--------------|----------------------------------|---------------|
| IBM DB2 | `:db2` | `:host` `:database` | `:port` |
-| Oracle | `:oracle` | `:host` `:database`/`:system-id` | `:port` |
| SapDB | `:sapdb` | `:host` `:database` | `:port` |
| SQL Server | `:sqlserver` | | `:host` `:instance` `:port` |
| Sybase | `:sybase` | `:host` | `:port` `:database` |
Please sign in to comment.
Something went wrong with that request. Please try again.