Jamdb.Oracle (jamdb_oracle v0.4.5)

Adapter module for Oracle. DBConnection behaviour implementation.

It uses jamdb_oracle for communicating to the database.

Link to this section Summary

Functions

Returns the configured JSON library.

Runs the SQL statement.

Starts and links to a database connection process.

Link to this section Functions

Specs

json_library() :: module()

Returns the configured JSON library.

To customize the JSON library, include the following in your config/config.exs:

config :jamdb_oracle, :json_library, SomeJSONModule

Defaults to Jason

Link to this function

query(conn, sql, params \\ [])

Specs

query(conn :: any(), sql :: any(), params :: any()) ::
  {:ok, any()} | {:error | :disconnect, any()}

Runs the SQL statement.

See DBConnection.prepare_execute/4.

In case of success, it must return an :ok tuple containing a map with at least two keys:

  • :num_rows - the number of rows affected
  • :rows - the result set as a list
Link to this function

start_link(opts)

Specs

start_link(opts :: Keyword.t()) :: {:ok, pid()} | {:error, any()}

Starts and links to a database connection process.

See Ecto.Adapters.Jamdb.Oracle.

By default the DBConnection starts a pool with a single connection. The size of the pool can be increased with :pool_size. The ping interval to validate an idle connection can be given with the :idle_interval option.