View Source AshSqlite.Repo behaviour (ash_sqlite v0.1.2)

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.

Link to this callback

override_migration_type(atom)

View Source
@callback override_migration_type(atom()) :: atom()

Allows overriding a given migration type for all fields, for example if you wanted to always use :timestamptz for :utc_datetime fields