View Source AshSqlite.Repo behaviour (ash_sqlite v0.2.1)
Resources that use AshSqlite.DataLayer
use a Repo
to access the database.
This repo is a thin wrapper around an Ecto.Repo
.
You can use Ecto.Repo
's init/2
to configure your repo like normal, but
instead of returning {:ok, config}
, use super(config)
to pass the
configuration to the AshSqlite.Repo
implementation.
Summary
Callbacks
Use this to inform the data layer about what extensions are installed
The path where your migrations are stored
Use this to inform the data layer about the oldest potential sqlite version it will be run on.
Allows overriding a given migration type for all fields, for example if you wanted to always use :timestamptz for :utc_datetime fields
Callbacks
@callback installed_extensions() :: [String.t()]
Use this to inform the data layer about what extensions are installed
@callback migrations_path() :: String.t() | nil
The path where your migrations are stored
@callback min_pg_version() :: integer()
Use this to inform the data layer about the oldest potential sqlite version it will be run on.
Must be an integer greater than or equal to 13.
Allows overriding a given migration type for all fields, for example if you wanted to always use :timestamptz for :utc_datetime fields