Liking cljdoc? Tell your friends :D

systems.thoughtfull.amalgam.jdbc


->DataSourceComponentclj

(->DataSourceComponent make-data-source-fn login-timeout-duration log-writer)

Positional factory function for class systems.thoughtfull.amalgam.jdbc.DataSourceComponent.

A SQL data source that is also a component. It can be injected as a dependency of other components but also implements the DataSource interface.

If the wrapped data source implements java.io.AutoCloseable or java.io.Closeable, then when the component is stopped it will close the data source. If the wrapped data source does not implement either interface, then stop will not attempt to close it.

  • make-data-source-fn — a function that takes the DataSourceComponent as an argument and creates a DataSource for wrapping. Any options necessary for constructing a DataSource should be taken from the DataSourceComponent.
  • login-timeout-duration — the maximum java.time.Duration to wait while attempting to connect to a database. A value of zero specifies that the timeout is the default system timeout if there is one; otherwise, it specifies that there is no timeout. When a DataSource object is created, the login timeout is initially zero.
  • log-writer — a java.io.PrintWriter to set as the log writer for this data source, defaults to nil which disables logging.
Positional factory function for class systems.thoughtfull.amalgam.jdbc.DataSourceComponent.

A SQL data source that is also a component.  It can be injected as a dependency of other
components but also implements the DataSource interface.

If the wrapped data source implements *java.io.AutoCloseable* or *java.io.Closeable*, then when
the component is stopped it will close the data source.  If the wrapped data source does not
implement either interface, then stop will not attempt to close it.

- **`make-data-source-fn`** — a function that takes the DataSourceComponent as an argument and
  creates a DataSource for wrapping.  Any options necessary for constructing a DataSource should
  be taken from the DataSourceComponent.
- **`login-timeout-duration`** — the maximum *java.time.Duration* to wait while attempting to
  connect to a database.  A value of zero specifies that the timeout is the default system timeout
  if there is one; otherwise, it specifies that there is no timeout. When a DataSource object is
  created, the login timeout is initially zero.
- **`log-writer`** — a *java.io.PrintWriter* to set as the log writer for this data source,
  defaults to nil which disables logging.
sourceraw docstring

data-sourceclj

(data-source make-data-source-fn {:keys [login-timeout-duration log-writer]})

Make a new DataSourceComponent wrapping a javax.sql.DataSource.

If the wrapped data source implements java.io.AutoCloseable or java.io.Closeable, then when the component is stopped it will close the data source. If the wrapped data source does not implement either interface, then stop will not attempt to close it.

  • make-data-source-fn — a function that takes the DataSourceComponent as an argument and creates a DataSource for wrapping. Any options necessary for constructing a DataSource should be taken from the DataSourceComponent.
  • login-timeout-duration — the maximum java.time.Duration to wait while attempting to connect to a database. A value of zero specifies that the timeout is the default system timeout if there is one; otherwise, it specifies that there is no timeout. When a DataSource object is created, the login timeout is initially zero.
  • log-writer — a java.io.PrintWriter to set as the log writer for this data source, defaults to nil which disables logging.

Any additional options are passed along to the DataSourceComponent and then to make-data-source-fn when the component is started.

See javax.sql.DataSource

Make a new DataSourceComponent wrapping a javax.sql.DataSource.

If the wrapped data source implements *java.io.AutoCloseable* or *java.io.Closeable*, then when
the component is stopped it will close the data source.  If the wrapped data source does not
implement either interface, then stop will not attempt to close it.

- **`make-data-source-fn`** — a function that takes the DataSourceComponent as an argument and
  creates a DataSource for wrapping.  Any options necessary for constructing a DataSource should
  be taken from the DataSourceComponent.
- **`login-timeout-duration`** — the maximum *java.time.Duration* to wait while attempting to
  connect to a database.  A value of zero specifies that the timeout is the default system timeout
  if there is one; otherwise, it specifies that there is no timeout. When a DataSource object is
  created, the login timeout is initially zero.
- **`log-writer`** — a *java.io.PrintWriter* to set as the log writer for this data source,
  defaults to nil which disables logging.

Any additional options are passed along to the DataSourceComponent and then to
`make-data-source-fn` when the component is started.

See *javax.sql.DataSource*
sourceraw docstring

map->DataSourceComponentclj

(map->DataSourceComponent &
                          {:keys [make-data-source-fn login-timeout-duration
                                  log-writer]})

Factory function for class systems.thoughtfull.amalgam.jdbc.DataSourceComponent, taking a map of keywords to field values.

A SQL data source that is also a component. It can be injected as a dependency of other components but also implements the DataSource interface.

If the wrapped data source implements java.io.AutoCloseable or java.io.Closeable, then when the component is stopped it will close the data source. If the wrapped data source does not implement either interface, then stop will not attempt to close it.

  • make-data-source-fn — a function that takes the DataSourceComponent as an argument and creates a DataSource for wrapping. Any options necessary for constructing a DataSource should be taken from the DataSourceComponent.
  • login-timeout-duration — the maximum java.time.Duration to wait while attempting to connect to a database. A value of zero specifies that the timeout is the default system timeout if there is one; otherwise, it specifies that there is no timeout. When a DataSource object is created, the login timeout is initially zero.
  • log-writer — a java.io.PrintWriter to set as the log writer for this data source, defaults to nil which disables logging.
Factory function for class systems.thoughtfull.amalgam.jdbc.DataSourceComponent, taking a map of keywords to field values.

A SQL data source that is also a component.  It can be injected as a dependency of other
components but also implements the DataSource interface.

If the wrapped data source implements *java.io.AutoCloseable* or *java.io.Closeable*, then when
the component is stopped it will close the data source.  If the wrapped data source does not
implement either interface, then stop will not attempt to close it.

- **`make-data-source-fn`** — a function that takes the DataSourceComponent as an argument and
  creates a DataSource for wrapping.  Any options necessary for constructing a DataSource should
  be taken from the DataSourceComponent.
- **`login-timeout-duration`** — the maximum *java.time.Duration* to wait while attempting to
  connect to a database.  A value of zero specifies that the timeout is the default system timeout
  if there is one; otherwise, it specifies that there is no timeout. When a DataSource object is
  created, the login timeout is initially zero.
- **`log-writer`** — a *java.io.PrintWriter* to set as the log writer for this data source,
  defaults to nil which disables logging.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close