diff --git a/doc/all-the-options.md b/doc/all-the-options.md index 83eb335..5318596 100644 --- a/doc/all-the-options.md +++ b/doc/all-the-options.md @@ -11,7 +11,7 @@ Although `get-datasource` does not accept options, the "db spec" hash map passed * `:dbtype` -- a string that identifies the type of JDBC database being used, * `:dbname` -- a string that identifies the name of the actual database being used, * `:dbname-separator` -- an optional string that can be used to override the `/` or `:` that is normally placed in front of the database name in the JDBC URL, -* `:host` -- an optional string that identifies the IP address or hostname of the server on which the database is running; the default is `"127.0.0.1"`, +* `:host` -- an optional string that identifies the IP address or hostname of the server on which the database is running; the default is `"127.0.0.1"`; if `:none` is specified, `next.jdbc` will assume this is for a local database and will omit the host/port segment of the JDBC URL, * `:host-prefix` -- an optional string that can be used to override the `//` that is normally placed in front of the IP address or hostname in the JDBC URL, * `:port` -- an optional integer that identifies the port on which the database is running; for common database types, `next.jdbc` knows the default so this should only be needed for non-standard setups or "exotic" database types, * `:classname` -- an optional string that identifies the name of the JDBC driver class to be used for the connection; for common database types, `next.jdbc` knows the default so this should only be needed for "exotic" database types, diff --git a/src/next/jdbc.clj b/src/next/jdbc.clj index 0fe7e16..a9e6f79 100644 --- a/src/next/jdbc.clj +++ b/src/next/jdbc.clj @@ -61,7 +61,9 @@ The following optional keys are commonly used: * `:user` -- the username to authenticate with * `:password` -- the password to authenticate with - * `:host` -- the hostname or IP address of the database (default: `127.0.0.1`) + * `:host` -- the hostname or IP address of the database (default: `127.0.0.1`); + can be `:none` which means the host/port segment of the JDBC URL should + be omitted entirely (for 'local' databases) * `:port` -- the port for the database connection (the default is database- specific -- see below) * `:classname` -- if you need to override the default for the `:dbtype`