Skip to content

100Starlings/redshift_ecto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RedshiftEcto

Ecto Adapter for AWS Redshift.

This adapter is based on Ecto's builtin Postgres adapter. It delegates some functions to it but changes the implementation of most that are incompatible with Redshift. The differences are detailed in the documentation.

Documentation can be found at https://hexdocs.pm/redshift_ecto.

Installation

Add redshift_ecto to your list of dependencies in mix.exs:

def deps do
  [
    {:redshift_ecto, "~> 0.1.0"}
  ]
end

Example configuration

config :my_app, MyApp.Repo,
  adapter: RedshiftEcto,
  url: "ecto://user:pass@data-warehouse.abc123.us-east-1.redshift.amazonaws.com:5439/db"

Testing

Redshift doesn't support nested transactions which makes the builtin sandbox implementation of Ecto unusable for testing. RedshiftEcto depends on ecto_replay_sandbox which implements pseudo transactions that provides a similar experience in testing to the Ecto's sandbox. See the integration tests of the adapter for an example on how to use it.

Releases

No releases published

Packages

No packages published

Languages