View Source What is AshSqlite?

AshSqlite is the SQLite Ash.DataLayer for Ash Framework. This doesn't have all of the features of AshPostgres, but it does support most of the features of Ash data layers. The main feature missing is Aggregate support.

Use this to persist records in a SQLite table. For example, the resource below would be persisted in a table called tweets:

defmodule MyApp.Tweet do
  use Ash.Resource,
    data_layer: AshSQLite.DataLayer

  attributes do
    integer_primary_key :id
    attribute :text, :string

  relationships do
    belongs_to :author, MyApp.User

  sqlite do
    table "tweets"
    repo MyApp.Repo

The table might look like this:

1"Hello, world!"1

Creating records would add to the table, destroying records would remove from the table, and updating records would update the table.