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
Copy file name to clipboardExpand all lines: README.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,23 @@ See the [getting started guide](https://hexdocs.pm/ecto/getting-started.html) an
81
81
82
82
*[The Little Ecto Cookbook](https://dashbit.co/ebooks/the-little-ecto-cookbook), a free ebook by Dashbit, which is a curation of the existing Ecto guides with some extra contents
83
83
84
+
### IPv6 support
85
+
86
+
Does not happen automagically. If your database's host resolves to ipv6 address you should
87
+
add `socket_options: [:inet6]` to configuration block like below:
88
+
89
+
```elixir
90
+
importMix.Config
91
+
92
+
config :your_app, :tds_conn,
93
+
hostname:"db12.dc0.comp.any",
94
+
username:"test_user",
95
+
password:"test_password",
96
+
database:"lomaster",
97
+
port:1433,
98
+
socket_options: [:inet6] # here you may also add all the options for `gen_tcp` erlang module
99
+
```
100
+
84
101
## Usage
85
102
86
103
You need to add both Ecto and the database adapter as a dependency to your `mix.exs` file. The supported databases and their adapters are:
Copy file name to clipboardExpand all lines: guides/introduction/Getting Started.md
+43Lines changed: 43 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,6 +119,49 @@ This tells our application about the repo, which will allow us to run commands s
119
119
120
120
We've now configured our application so that it's able to make queries to our database. Let's now create our database, add a table to it, and then perform some queries.
121
121
122
+
### IPv6 support
123
+
124
+
Does not happen automagically. If your database's host resolves to ipv6 address you should
125
+
add `socket_options: [:inet6]` to configuration block like below:
126
+
127
+
```elixir
128
+
importMix.Config
129
+
130
+
config :your_app, :your_connection,
131
+
hostname:"db12.dc0.comp.any", # just an example
132
+
socket_options: [:inet6] # here you may also add all the options for `gen_tcp` erlang module
133
+
# ... other options
134
+
```
135
+
136
+
### Unix socket connection
137
+
138
+
For faster communication, you may consider communicating with Postgres via Unix sockets.
139
+
If your PG server was started on the same machine as your code, you could check that.
0 commit comments