Skip to content

Commit c421741

Browse files
authored
Misc doc changes (#291)
List of changes: - Fix typos - Remove empty tabs - Use common source url - Add changelog to html doc
1 parent 69f0cb4 commit c421741

8 files changed

Lines changed: 21 additions & 17 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
mix local.hex --force
5656
mix deps.get
5757
- run: MYSQL_URL=root:root@mysql ECTO_ADAPTER=myxql mix test
58-
58+
5959
test-mssql:
6060
runs-on: ubuntu-latest
6161

@@ -73,7 +73,7 @@ jobs:
7373
mssql_version: ["2017-latest", "2019-latest"]
7474
otp: [22.1.7]
7575
elixir: [1.9.4]
76-
76+
7777
env:
7878
ACCEPT_EULA: Y
7979
MIX_ENV: test
@@ -95,7 +95,7 @@ jobs:
9595
- run: |
9696
export PATH="/opt/mssql-tools/bin:$PATH"
9797
ECTO_ADAPTER=tds mix test
98-
98+
9999
test-pg:
100100
runs-on: ubuntu-18.04
101101

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
### Enhancements
118118

119119
* [ecto] Upgrade and support Ecto v3.3
120-
* [repo] Include `:idle_time` on telemetry measuremnts
120+
* [repo] Include `:idle_time` on telemetry measurements
121121
* [migration] Support anonymous functions in `Ecto.Migration.execute/2`
122122

123123
### Bug fixes
@@ -216,7 +216,7 @@ v3.1 requires Elixir v1.5+.
216216
* [sandbox] Respect `:ownership_timeout` repo configuration on SQL Sandbox
217217
* [migrations] Commit and relock after every migration to avoid leaving the DB in an inconsistent state under certain failures
218218

219-
### Backwards incompatible changess
219+
### Backwards incompatible changes
220220

221221
* [migrations] If you are creating indexes concurrently, you need to disable the migration lock: `config :app, App.Repo, migration_lock: nil`. This will migrations behave the same way as they did in Ecto 2.0.
222222

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Ecto SQL
22
=========
3+
34
[![Build Status](https://github.com/elixir-ecto/ecto_sql/workflows/CI/badge.svg)](https://github.com/elixir-ecto/ecto_sql/actions)
45

56
Ecto SQL ([documentation](https://hexdocs.pm/ecto_sql)) provides building blocks for writing SQL adapters for Ecto. It features:
@@ -9,7 +10,7 @@ Ecto SQL ([documentation](https://hexdocs.pm/ecto_sql)) provides building blocks
910
* A test sandbox (Ecto.Adapters.SQL.Sandbox) that concurrently runs database tests inside transactions
1011
* Support for database migrations via Mix tasks
1112

12-
To learn more about getting started, [see the Ecto repository](https://github.com/elixir-ecto/ecto).
13+
To learn more about getting started, [see the Ecto repository](https://github.com/elixir-ecto/ecto).
1314

1415
## Running tests
1516

lib/ecto/adapters/sql.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ defmodule Ecto.Adapters.SQL do
256256
iex> Ecto.Adapters.SQL.explain(Repo, :all, Post, analyze: true, timeout: 20_000)
257257
"Seq Scan on posts p0 (cost=0.00..11.70 rows=170 width=443) (actual time=0.013..0.013 rows=0 loops=1)\\nPlanning Time: 0.031 ms\\nExecution Time: 0.021 ms"
258258
259-
It's safe to execute it for updates and deletes, no data change will be commited:
259+
It's safe to execute it for updates and deletes, no data change will be committed:
260260
261261
iex> Ecto.Adapters.SQL.explain(Repo, :update_all, from(p in Post, update: [set: [title: "new title"]]))
262262
"Update on posts p0 (cost=0.00..11.70 rows=170 width=449)\\n -> Seq Scan on posts p0 (cost=0.00..11.70 rows=170 width=449)"

lib/ecto/adapters/tds.ex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ defmodule Ecto.Adapters.Tds do
3535
3636
config :tds, :text_encoder, Tds.Encoding
3737
38-
This should give you extended set of most encoding. For cemplete list check
38+
This should give you extended set of most encoding. For complete list check
3939
`Tds.Encoding` [documentation](https://hexdocs.pm/tds_encoding).
4040
4141
### After connect flags
@@ -66,7 +66,7 @@ defmodule Ecto.Adapters.Tds do
6666
6767
### SQL `Char`, `VarChar` and `Text` types
6868
69-
When working with binaries and strings,there are some limitions you should be aware of:
69+
When working with binaries and strings,there are some limitations you should be aware of:
7070
7171
- Strings that should be stored in mentioned sql types must be encoded to column
7272
codepage (defined in collation). If collation is different than database collation,
@@ -116,17 +116,17 @@ defmodule Ecto.Adapters.Tds do
116116
117117
To avoid deadlocks in your app, we exposed `:isolation_level` repo transaction option.
118118
This will tell to SQL Server Transaction Manager how to begin transaction.
119-
By default, if this option is ommited, isolation level is set to `:read_committed`.
119+
By default, if this option is omitted, isolation level is set to `:read_committed`.
120120
121-
Any attempt to manualy set the transaction isolation via queries, such as
121+
Any attempt to manually set the transaction isolation via queries, such as
122122
123123
Ecto.Adapter.SQL.query("SET TRANSACTION ISOLATION LEVEL XYZ")
124124
125125
will fail once explicit transaction is started using `c:Ecto.Repo.transaction/2`
126126
and reset back to :read_commited.
127127
128128
There is `Ecto.Query.lock/3` function can help by setting it to `WITH(NOLOCK)`.
129-
This should allow you to do eventualy consistent reads and avoid locks on given
129+
This should allow you to do eventually consistent reads and avoid locks on given
130130
table if you don't need to write to database.
131131
132132
NOTE: after explicit transaction ends (commit or rollback) implicit transactions
@@ -215,7 +215,7 @@ defmodule Ecto.Adapters.Tds do
215215
@impl Ecto.Adapter.Storage
216216
def storage_status(opts) do
217217
database =
218-
Keyword.fetch!(opts, :database) || raise ":database is nil in repostory configuration"
218+
Keyword.fetch!(opts, :database) || raise ":database is nil in repository configuration"
219219

220220
opts = Keyword.put(opts, :database, "master")
221221

lib/ecto/adapters/tds/types.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ if Code.ensure_loaded?(Tds) do
225225

226226
defmodule Tds.Ecto.VarChar do
227227
@moduledoc """
228-
An Tds adatper Ecto Type that wrapps erlang string into tuple so TDS driver
228+
An Tds adapter Ecto Type that wraps erlang string into tuple so TDS driver
229229
can understand if erlang string should be encoded as NVarChar or Varchar.
230230
231231
Due some limitations in Ecto and Tds driver, it is not possible to

lib/ecto/migration.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ defmodule Ecto.Migration do
282282
but not true for MySQL, as the latter does not support DDL transactions.
283283
284284
In some rare cases, you may need to execute some common behavior after beginning
285-
a migration transaction, or before commiting that transaction. For instance, one
285+
a migration transaction, or before committing that transaction. For instance, one
286286
might desire to set a `lock_timeout` for each lock in the migration transaction.
287287
288288
You can do so by defining `c:after_begin/0` and `c:before_commit/0` callbacks to

mix.exs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
defmodule EctoSQL.MixProject do
22
use Mix.Project
33

4+
@source_url "https://github.com/elixir-ecto/ecto_sql"
45
@version "3.6.0-dev"
56
@adapters ~w(pg myxql tds)
67

@@ -112,7 +113,7 @@ defmodule EctoSQL.MixProject do
112113
[
113114
maintainers: ["Eric Meadows-Jönsson", "José Valim", "James Fish", "Michał Muskała"],
114115
licenses: ["Apache-2.0"],
115-
links: %{"GitHub" => "https://github.com/elixir-ecto/ecto_sql"},
116+
links: %{"GitHub" => @source_url},
116117
files:
117118
~w(.formatter.exs mix.exs README.md CHANGELOG.md lib) ++
118119
~w(integration_test/sql integration_test/support)
@@ -173,7 +174,9 @@ defmodule EctoSQL.MixProject do
173174
main: "Ecto.Adapters.SQL",
174175
source_ref: "v#{@version}",
175176
canonical: "http://hexdocs.pm/ecto_sql",
176-
source_url: "https://github.com/elixir-ecto/ecto_sql",
177+
source_url: @source_url,
178+
extras: ["CHANGELOG.md"],
179+
skip_undefined_reference_warnings_on: ["CHANGELOG.md"],
177180
groups_for_modules: [
178181
# Ecto.Adapters.SQL,
179182
# Ecto.Adapters.SQL.Sandbox,

0 commit comments

Comments
 (0)