Skip to content

Commit 097cb0d

Browse files
committed
Extension -> TypeExtension
1 parent 2ae24a0 commit 097cb0d

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,14 @@ config :my_app, MyApp.Repo,
4949

5050
Type extensions allow custom data types to be stored and retrieved from an SQLite3 database.
5151

52-
This is done by implementing a module with the `Ecto.Adapters.SQLite3.Extension` behaviour which maps types to encoder and decoder functions. Extensions are activated by adding them to the `ecto_sqlite3` configuration as a list of extention modules assigned to the `extensions` key:
52+
This is done by implementing a module with the `Ecto.Adapters.SQLite3.Extension` behaviour which maps types to encoder and decoder functions. Extensions are activated by adding them to the `ecto_sqlite3` configuration as a list of extention modules assigned to the `type_extensions` key:
5353

5454
```elixir
55+
config :exqlite:
56+
type_extensions: [GeoSQL.SpatialLite.TypeExtension]
57+
5558
config :ecto_sqlite3,
56-
extensions: [GeoSQL.SpatialLite.TypesExtension]
59+
type_extensions: [GeoSQL.SpatialLite.TypeExtension]
5760
```
5861

5962
## Database Encryption

lib/ecto/adapters/sqlite3.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ defmodule Ecto.Adapters.SQLite3 do
571571
end
572572

573573
defp extensions() do
574-
Application.get_env(:ecto_sqlite3, :extensions, [])
574+
Application.get_env(:ecto_sqlite3, :type_extensions, [])
575575
end
576576

577577
defp loader_from_extension(primitive_type, ecto_type) do

lib/ecto/adapters/sqlite3/extension.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
defmodule Ecto.Adapters.SQLite3.Extension do
1+
defmodule Ecto.Adapters.SQLite3.TypeExtension do
22
@moduledoc """
33
A behaviour that defines the API for extensions providing custom data loaders and dumpers
44
for Ecto schemas.

0 commit comments

Comments
 (0)