Ecto v1.1.0 Ecto.Adapters.Connection behaviour
Behaviour for adapters that rely on connections.
In order to use a connection, adapter developers need to implement
a single callback in a module: connect/1
defined in this module.
The benefits of implementing this module is that the adapter can then be used with all the different pools provided by Ecto.
Summary
Functions
Executes the connect in the given module, ensuring the repository’s
after_connect/1
is invoked in the process
Shutdown the given connection pid
Callbacks
Connects to the underlying database
Functions
Executes the connect in the given module, ensuring the repository’s
after_connect/1
is invoked in the process.
Callbacks
Specs
connect(Keyword.t) :: {:ok, pid} | {:error, term}
Connects to the underlying database.
Should return a process which is linked to the caller process or an error.