Liking cljdoc? Tell your friends :D

buttle.connection-pool-data-source

The Buttle javax.sql.ConnectionPoolDataSource (CP-datasource).

This namespace delivers buttle.jdbc.ConnectionPoolDataSource via :gen-class. This named class can be used as a CP-datasource class for application servers.

The _Buttle_ `javax.sql.ConnectionPoolDataSource` (CP-datasource).

This namespace delivers `buttle.jdbc.ConnectionPoolDataSource` via
`:gen-class`. This named class can be used as a CP-datasource class
for application servers.
raw docstring

buttle.data-source

The Buttle javax.sql.DataSource.

This namespace delivers buttle.jdbc.DataSource via :gen-class. This named class can be used as a datasource class for application servers.

The _Buttle_ `javax.sql.DataSource`.

This namespace delivers `buttle.jdbc.DataSource` via
`:gen-class`. This named class can be used as a datasource class for
application servers.
raw docstring

buttle.driver

The Buttle java.sql.Driver.

This namespace delivers buttle.jdbc.Driver via :gen-class. This named class can be used by tools (like SQuirreL) and the SPI services/java.sql.Driver.

The -init constructor function will register a Buttle Driver proxy (see make-driver) with the java.sql.DriverManager. So whenever an instance of buttle.jdbc.Driver is created, a new proxy ( not the buttle.jdbc.Driver!) is registered.

Example JDBC-URL:

jdbc:buttle:{:user "<user>" :password "<password>" :target-url "jdbc:postgresql://127.0.0.1:6632/postgres"}

Example Wildfly datasource (see README for more details):

  <datasource jndi-name="java:/jdbc/buttle-ds" pool-name="buttle-ds" use-java-context="true">
      <driver>buttle-driver</driver>
      <connection-url>
              jdbc:buttle:{
                      :user "<user>"
                      :password "<password>"
                      :class-for-name "org.postgresql.Driver"
                      :target-url "jdbc:postgresql://<host>:<port>/<db-id>"}
          </connection-url>
  </datasource>

When this namespace is loaded eval-buttle-user-file! will be executed.

WARNING: this means that anyone who controls the system properties of the hosting JVM can run any Clojure code (but then again --- when someone controls the system properties he/she is probably able to run any command anyway).

Functions in this namespace deliver all the functionality needed for the java.sql.Driver interface/contract. Things for connections, statements etc. are all delivered through buttle.proxy.

The _Buttle_ `java.sql.Driver`.

This namespace delivers `buttle.jdbc.Driver` via `:gen-class`. This
named class can be used by tools (like SQuirreL) and the SPI
`services/java.sql.Driver`.

The `-init` constructor function will register a _Buttle_ `Driver`
proxy (see `make-driver`) with the `java.sql.DriverManager`. So
whenever an instance of `buttle.jdbc.Driver` is created, a new
proxy ( __not__ the `buttle.jdbc.Driver`!) is registered.

__Example JDBC-URL__:

    jdbc:buttle:{:user "<user>" :password "<password>" :target-url "jdbc:postgresql://127.0.0.1:6632/postgres"}

__Example Wildfly datasource__ (see README for more details):

      <datasource jndi-name="java:/jdbc/buttle-ds" pool-name="buttle-ds" use-java-context="true">
          <driver>buttle-driver</driver>
          <connection-url>
                  jdbc:buttle:{
                          :user "<user>"
                          :password "<password>"
                          :class-for-name "org.postgresql.Driver"
                          :target-url "jdbc:postgresql://<host>:<port>/<db-id>"}
              </connection-url>
      </datasource>

When this namespace is loaded `eval-buttle-user-file!` will be
executed.

__WARNING:__ this means that anyone who controls the system
properties of the hosting JVM can run any Clojure code (but then
again --- when someone controls the system properties he/she is
probably able to run any command anyway).

Functions in this namespace deliver all the functionality needed for
the `java.sql.Driver` interface/contract. Things for connections,
statements etc. are all delivered through `buttle.proxy`.
raw docstring

buttle.driver-manager

A thin/simple Clojure API around java.sql.DriverManager.

A thin/simple Clojure API around `java.sql.DriverManager`.
raw docstring

buttle.event

Send events to consumers via clojure.core.async/chan.

Consumers can tap on event-mult to receive events that are produced through send-event. buttle.proxy/handle-default is such a producer.

Note that send-event synchronuosly puts events onto channel event-ch which is the input channel for event-mult. When there is no channel connected to event-mult (which is the case when this namespace is loaded the first time) calling send-event will not block (event-mult will just eat up those events). When there is one or more channels connected to event-mult (by consumers having called clojure.core.async/tap) calling send-event will block until the event has been sent/consumed by each of the connected channels. So make sure you have a go block consuming any channel that you connect to event-mult.

Send events to consumers via `clojure.core.async/chan`.

Consumers can `tap` on `event-mult` to receive events that are
produced through `send-event`. `buttle.proxy/handle-default` is such
a producer.

Note that `send-event` __synchronuosly__ puts events onto channel
`event-ch` which is the input channel for `event-mult`. When there
is __no__ __channel__ connected to `event-mult` (which is the case
when this namespace is loaded the first time) calling `send-event`
will __not__ __block__ (`event-mult` will just eat up those
events). When there __is__ one or more channels connected to
`event-mult` (by consumers having called `clojure.core.async/tap`)
calling `send-event` __will__ __block__ until the event has been
sent/consumed by each of the connected channels. So make sure you
have a `go` block consuming any channel that you connect to
`event-mult`.
raw docstring

buttle.proxy

A proxy factory.

This namespace delivers all functions needed to (generically) create proxies for JDBC related interfaces and to implement the delegation logic for these proxies that is needed to route method calls through to the real JDBC driver's instances.

In order to hook your own code into the delegation use def-handle to register your functions for certain method calls.

A proxy factory.

This namespace delivers all functions needed to (generically)
create proxies for JDBC related interfaces and to implement the
delegation logic for these proxies that is needed to route method
calls through to the _real_ JDBC driver's instances.

In order to hook your own code into the delegation use `def-handle`
to register your functions for certain method calls.
raw docstring

buttle.xa-data-source

The Buttle javax.sql.XADataSource.

This namespace delivers buttle.jdbc.XADataSource via :gen-class. This named class can be used as an XA-datasource class for application servers.

Example (Wildfly):

  <xa-datasource jndi-name="java:/jdbc/buttle-xa" pool-name="buttle-xa">
    <xa-datasource-class>buttle.jdbc.XADataSource</xa-datasource-class>
    <driver>buttle-driver</driver>
    <security>
      <user-name>postgres-user</user-name>
      <password>postgres-password</password>
    </security>
    <xa-datasource-property name="DelegateSpec">
      {:delegate-class org.postgresql.xa.PGXADataSource
       :url "jdbc:postgresql://127.0.0.1:6632/postgres"}
    </xa-datasource-property>
  </xa-datasource>
The _Buttle_ `javax.sql.XADataSource`.

This namespace delivers `buttle.jdbc.XADataSource` via
`:gen-class`. This named class can be used as an XA-datasource class
for application servers.

__Example (Wildfly)__:


      <xa-datasource jndi-name="java:/jdbc/buttle-xa" pool-name="buttle-xa">
        <xa-datasource-class>buttle.jdbc.XADataSource</xa-datasource-class>
        <driver>buttle-driver</driver>
        <security>
          <user-name>postgres-user</user-name>
          <password>postgres-password</password>
        </security>
        <xa-datasource-property name="DelegateSpec">
          {:delegate-class org.postgresql.xa.PGXADataSource
           :url "jdbc:postgresql://127.0.0.1:6632/postgres"}
        </xa-datasource-property>
      </xa-datasource>
raw docstring

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

× close