Ecto.Adapter.Structure
Ecto.Adapter.Structure behaviour
Specifies the adapter structure API.
Summary
Callbacks
- structure_dump(default, config)
-
Dumps the given structure
- structure_load(default, config)
-
Loads the given structure
Callbacks
structure_dump(default, config)
structure_dump(default :: String.t, config :: Keyword.t) :: {:ok, String.t} | {:error, term}
Dumps the given structure.
The path will be looked in the config
under :dump_path or default to the structure path inside default
.
Returns :ok
if it was loaded successfully, an error tuple otherwise.
Examples
structure_dump("priv/repo", username: "postgres",
database: "ecto_test",
hostname: "localhost")
structure_load(default, config)
structure_load(default :: String.t, config :: Keyword.t) :: {:ok, String.t} | {:error, term}
Loads the given structure.
The path will be looked in the config
under :dump_path or default to the structure path inside default
.
Returns :ok
if it was loaded successfully, an error tuple otherwise.
Examples
structure_load("priv/repo", username: "postgres",
database: "ecto_test",
hostname: "localhost")
© 2012 Plataformatec
Licensed under the Apache License, Version 2.0.
https://hexdocs.pm/ecto/Ecto.Adapter.Structure.html