ecto_sqlite3

An Ecto SQLite3 adapter.

Latest version: 0.17.4 registry icon
Maintenance score
100
Safety score
100
Popularity score
74
Check your open source dependency risks. Get immediate insight about security, stability and licensing risks.
Security
  Vulnerabilities
Version Suggest Low Medium High Critical
0.17.4 0 0 0 0 0
0.17.3 0 0 0 0 0
0.17.2 0 0 0 0 0
0.17.1 0 0 0 0 0
0.17.0 0 0 0 0 0
0.16.0 0 0 0 0 0
0.15.1 0 0 0 0 0
0.15.0 0 0 0 0 0
0.14.0 0 0 0 0 0
0.13.0 0 0 0 0 0
0.12.0 0 0 0 0 0
0.11.0 0 0 0 0 0
0.10.4 0 0 0 0 0
0.10.3 0 0 0 0 0
0.10.2 0 0 0 0 0
0.10.1 0 0 0 0 0
0.10.0 0 0 0 0 0
0.9.1 0 0 0 0 0
0.9.0 0 0 0 0 0
0.8.2 0 0 0 0 0
0.8.1 0 0 0 0 0
0.8.0 0 0 0 0 0
0.7.7 0 0 0 0 0
0.7.6 0 0 0 0 0
0.7.5 0 0 0 0 0
0.7.4 0 0 0 0 0
0.7.3 0 0 0 0 0
0.7.2 0 0 0 0 0
0.7.1 0 0 0 0 0
0.7.0 0 0 0 0 0
0.6.1 0 0 0 0 0
0.6.0 0 0 0 0 0
0.5.7 0 0 0 0 0
0.5.6 0 0 0 0 0
0.5.5 0 0 0 0 0
0.5.4 0 0 0 0 0
0.5.3 0 0 0 0 0
0.5.2 0 0 0 0 0
0.5.1 0 0 0 0 0
0.5.0 0 0 0 0 0

Stability
Latest release:

0.17.4 - This version is safe to use because it has no known security vulnerabilities at this time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform

Licensing

Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.

MIT   -   MIT License

Not a wildcard

Not proprietary

OSI Compliant



Ecto SQLite3 Adapter

Build Status Hex Package Hex Docs

An Ecto SQLite3 Adapter. Uses Exqlite as the driver to communicate with sqlite3.

Caveats and limitations

See Limitations in Hexdocs.

Installation

defp deps do
  [
    {:ecto_sqlite3, "~> 0.17"}
  ]
end

Usage

Define your repo similar to this.

defmodule MyApp.Repo do
  use Ecto.Repo, otp_app: :my_app, adapter: Ecto.Adapters.SQLite3
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.SQLite. It will have more information on what is configurable.

config :my_app,
  ecto_repos: [MyApp.Repo]

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

Database Encryption

As of version 0.9, exqlite supports loading database engines at runtime rather than compiling sqlite3.c itself. This can be used to support database level encryption via alternate engines such as SQLCipher or the Official SEE extension. Once you have either of those projects installed on your system, use the following environment variables during compilation:

# tell exqlite that we wish to use some other sqlite installation. this will prevent sqlite3.c and friends from compiling
export EXQLITE_USE_SYSTEM=1

# Tell exqlite where to find the `sqlite3.h` file
export EXQLITE_SYSTEM_CFLAGS=-I/usr/local/include/sqlcipher

# tell exqlite which sqlite implementation to use
export EXQLITE_SYSTEM_LDFLAGS=-L/usr/local/lib -lsqlcipher

Once you have exqlite configured, you can use the :key option in the database config to enable encryption:

config :my_app, MyApp.Repo,
  database: "path/to/my/encrypted-database.db",
  key: "supersecret'

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

EXQLITE_INTEGRATION=true mix test