Instream.Connection behaviour

Connection (pool) definition.

All database connections will be made using a user-defined extension of this module.

Example Module

defmodule MyConnection do
  use Instream.Connection, otp_app: :my_application
end

Example Configuration

config :my_application, MyConnection,
  hosts:    [ "primary.example.com", "secondary.example.com" ],
  password: "pass",
  pool:     [ max_overflow: 10, size: 5 ],
  port:     8086,
  scheme:   "http",
  username: "root"
Source

Callbacks

__pool__/0

Specs:

  • __pool__ :: module

Returns the (internal) pool module.

Source
child_spec/0

Specs:

Returns a supervisable pool child_spec.

Source
config/0

Specs:

Returns the connection configuration.

Source
execute/2

Specs:

Executes a query.

Source