You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this allows type extensions to be registered at runtime via the
`:ecto_sqlite3, extensions:` configuration key, which takes a list
of modules that implement the `Extension` behaviour.
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,17 @@ config :my_app, MyApp.Repo,
45
45
database:"path/to/my/database.db"
46
46
```
47
47
48
+
## Type Extensions
49
+
50
+
Type extensions allow custom data types to be stored and retrieved from an SQLite3 database.
51
+
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:
53
+
54
+
```elixir
55
+
config :ecto_sqlite3,
56
+
extensions: [GeoSQL.SpatialLite.TypesExtension]
57
+
```
58
+
48
59
## Database Encryption
49
60
50
61
As of version 0.9, `exqlite` supports loading database engines at runtime rather than compiling `sqlite3.c` itself.
0 commit comments