Skip to content

jacson-junior/ecto_libsql

Repository files navigation

Ecto libSQL Adapter

Build Status

An Ecto libSQL Adapter. Uses ExLibSQL as the driver to communicate with libSQL. Based on the Ecto SQLite3 Adapter

Installation

defp deps do
  [
    {:ecto_libsql, "~> 0.1"}
  ]
end

Usage

Define your repo similar to this.

defmodule MyApp.Repo do
  use Ecto.Repo, otp_app: :my_app, adapter: Ecto.Adapters.LibSQL
end

Configure your repository similar to the following. If you want to know more about the possible options to pass the repository, checkout the documentation for Ecto.Adapters.LibSQL. It will have more information on what is configurable.

config :my_app,
  ecto_repos: [MyApp.Repo]

config :my_app, MyApp.Repo,
  mode: :local,
  path: "path/to/my/database.db"

Benchmarks

We have some benchmarks comparing it against the MySQL and Postgres adapters.

You can read more about those at bench/README.md.

Running Tests

Running unit tests

mix test

Running integration tests

EX_LIBSQL_INTEGRATION=true mix test

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages