Postgrex.Extension and Ecto.Type for PostgreSQL isn module
Go to file
Martin Frost ba23be86bb v0.1: Flesh out library with all types in isn
Restructuring: Isn.Extension is now called Isn, which means that the postgrex
configuration line becomes a bit shorter now:

```elixir
{:ok, pid} = Postgrex.Connection.start_link(
  database: "isn_test",
  extensions: [{Isn, {}}])
```

instead of the previous version, with `extensions: [{Isn.Extension, {}}]`.

I also implement the entire library in the `lib/isn.ex` file, since it felt
pretty silly to have eight different one-line files under `lib/isn/` looking
like this: `defmodule Isn.ISBN, do: use(Isn.Base, :isbn)`

We now have the following types:

- ISBN
- ISBN13
- ISMN
- ISMN13
- ISSN
- ISSN13
- EAN13
- UPC
2015-05-27 18:22:51 +02:00
config WIP 2015-05-05 22:15:40 +02:00
lib v0.1: Flesh out library with all types in isn 2015-05-27 18:22:51 +02:00
test v0.1: Flesh out library with all types in isn 2015-05-27 18:22:51 +02:00
.gitignore WIP 2015-05-05 22:15:40 +02:00
README.md Added encode/decode tests for postgrex extension 2015-05-21 08:46:07 +02:00
mix.exs v0.1: Flesh out library with all types in isn 2015-05-27 18:22:51 +02:00
mix.lock WIP 2015-05-05 22:15:40 +02:00

README.md

Isn

Add support for the isn module in Postgrex/Ecto.

This module adds the following ecto types:

  • Isn.ISBN
  • Isn.ISBN13
  • Isn.ISMN
  • Isn.ISMN13
  • Isn.ISSN
  • Isn.ISSN13
  • Isn.EAN13
  • Isn.UPC