# `ADK.Session.Store.Ecto`
[🔗](https://github.com/zeroasterisk/adk-elixir/blob/main/lib/adk/session/store/ecto.ex#L2)

Ecto-backed session store.

Persists sessions to a relational database via the user's Ecto repo.

## Setup

1. Add `ecto` and `ecto_sql` to your deps
2. Run `mix adk.gen.migration` to generate the migration
3. Run `mix ecto.migrate`

## Usage

    ADK.Session.start_link(
      app_name: "my_app",
      user_id: "user1",
      session_id: "sess1",
      store: {ADK.Session.Store.Ecto, [repo: MyApp.Repo]}
    )

## Configuration

You can set a default repo in config:

    config :adk, ADK.Session.Store.Ecto, repo: MyApp.Repo

---

*Consult [api-reference.md](api-reference.md) for complete listing*
