Ecto v1.1.8 Ecto.Adapter.Storage behaviour

Specifies the adapter storage API.

Summary

Callbacks

Drop the storage in the data store and return :ok if it was dropped successfully

Create the storage in the data store and return :ok if it was created successfully

Callbacks

storage_down(arg0)

Specs

storage_down(Keyword.t) ::
  :ok |
  {:error, :already_down} |
  {:error, term}

Drop the storage in the data store and return :ok if it was dropped successfully.

Returns {:error, :already_down} if the storage has already been dropped or {:error, term} in case anything else goes wrong.

Examples

storagedown(username: postgres, database: 'ectotest', hostname: 'localhost')

storage_up(arg0)

Specs

storage_up(Keyword.t) ::
  :ok |
  {:error, :already_up} |
  {:error, term}

Create the storage in the data store and return :ok if it was created successfully.

Returns {:error, :already_up} if the storage has already been created or {:error, term} in case anything else goes wrong.

Examples

storageup(username: postgres, database: 'ectotest', hostname: 'localhost')