Skip to content

Commit fa42b1b

Browse files
authored
Fix typos (#293)
1 parent c421741 commit fa42b1b

10 files changed

Lines changed: 21 additions & 21 deletions

File tree

integration_test/sql/alter.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ defmodule Ecto.Integration.AlterTest do
7070
assert :ok == run(:down, PoolRepo, AlterMigrationOne)
7171
end
7272

73-
test "reset cache on parameterised query after alter column type" do
73+
test "reset cache on parameterized query after alter column type" do
7474
values = from v in "alter_col_type"
7575

7676
assert :ok == run(:up, PoolRepo, AlterMigrationOne)

lib/ecto/adapters/sql.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ defmodule Ecto.Adapters.SQL do
2727
* `mix ecto.migrate` - runs a migration
2828
* `mix ecto.rollback` - rolls back a previously run migration
2929
30-
If you want to run migrations programatically, see `Ecto.Migrator`.
30+
If you want to run migrations programmatically, see `Ecto.Migrator`.
3131
3232
## SQL sandbox
3333

lib/ecto/adapters/tds.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ defmodule Ecto.Adapters.Tds do
6060
6161
### UUIDs
6262
63-
MSSQL server has slightly different binary storage format for UUIDs (`uniqueidenitifer`).
63+
MSSQL server has slightly different binary storage format for UUIDs (`uniqueidentifier`).
6464
If you use `:binary_id`, the proper choice is made. Otherwise you must use the `Tds.Ecto.UUID`
6565
type. Avoid using `Ecto.UUID` since it may cause unpredictable application behaviour.
6666
@@ -75,9 +75,9 @@ defmodule Ecto.Adapters.Tds do
7575
codepage.
7676
7777
- If you need other than Latin1 or other than your database default collation, as
78-
mentioned in "Storage Options" section, then manualy encode strings using
78+
mentioned in "Storage Options" section, then manually encode strings using
7979
`Tds.Encoding.encode/2` into desired codepage and then tag parameter as `:binary`.
80-
Please be aware that queries that use this approach in where calues can be 10x slower
80+
Please be aware that queries that use this approach in where clauses can be 10x slower
8181
due increased logical reads in database.
8282
8383
- You can't store VarChar codepoints encoded in one collation/codepage to column that
@@ -123,7 +123,7 @@ defmodule Ecto.Adapters.Tds do
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`
126-
and reset back to :read_commited.
126+
and reset back to :read_committed.
127127
128128
There is `Ecto.Query.lock/3` function can help by setting it to `WITH(NOLOCK)`.
129129
This should allow you to do eventually consistent reads and avoid locks on given

lib/ecto/adapters/tds/connection.ex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ if Code.ensure_loaded?(Tds) do
683683
Enum.map_join(fields, ", ", &"#{name}.#{quote_name(&1)}")
684684
end
685685

686-
# eaxmple from {:in, [], [1, {:^, [], [0, 0]}]}
686+
# example from {:in, [], [1, {:^, [], [0, 0]}]}
687687
defp expr({:in, _, [_left, []]}, _sources, _query) do
688688
"0=1"
689689
end
@@ -806,7 +806,7 @@ if Code.ensure_loaded?(Tds) do
806806
end
807807

808808
defp expr(%Decimal{exp: exp} = decimal, _sources, _query) do
809-
# this should help gaining precision for decimals values embeded in query
809+
# this should help gaining precision for decimals values embedded in query
810810
# but this is still not good enough, for instance:
811811
#
812812
# from(p in Post, select: type(2.0 + ^"2", p.cost())))
@@ -819,7 +819,7 @@ if Code.ensure_loaded?(Tds) do
819819
# FROM [posts] AS p0
820820
#
821821
# as long as we have CAST(... as DECIMAL) without precision and scale
822-
# value could be trucated
822+
# value could be truncated
823823
[
824824
"CAST(",
825825
Decimal.to_string(decimal, :normal),
@@ -1478,7 +1478,7 @@ if Code.ensure_loaded?(Tds) do
14781478

14791479
defp quote_name(name) do
14801480
if String.contains?(name, ["[", "]"]) do
1481-
error!(nil, "bad field name #{inspect(name)} '[' and ']' are not permited")
1481+
error!(nil, "bad field name #{inspect(name)} '[' and ']' are not permitted")
14821482
end
14831483

14841484
"[#{name}]"
@@ -1501,7 +1501,7 @@ if Code.ensure_loaded?(Tds) do
15011501

15021502
defp quote_table(name) do
15031503
if String.contains?(name, "[") or String.contains?(name, "]") do
1504-
error!(nil, "bad table name #{inspect(name)} '[' and ']' are not permited")
1504+
error!(nil, "bad table name #{inspect(name)} '[' and ']' are not permitted")
15051505
end
15061506

15071507
"[#{name}]"
@@ -1523,7 +1523,7 @@ if Code.ensure_loaded?(Tds) do
15231523

15241524
defp unquoted_name(name) do
15251525
if String.contains?(name, ["[", "]"]) do
1526-
error!(nil, "bad table name #{inspect(name)} '[' and ']' are not permited")
1526+
error!(nil, "bad table name #{inspect(name)} '[' and ']' are not permitted")
15271527
end
15281528

15291529
name

lib/ecto/adapters/tds/types.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if Code.ensure_loaded?(Tds) do
1616
@type t :: <<_::288>>
1717

1818
@typedoc """
19-
A raw binary represenation of a UUID.
19+
A raw binary representation of a UUID.
2020
"""
2121
@type raw :: <<_::128>>
2222

@@ -233,7 +233,7 @@ if Code.ensure_loaded?(Tds) do
233233
Please be aware of this limitation if you plan to store varchar values in
234234
your database using Ecto since you will probably lose some codepoints in
235235
the value during encoding. Instead use `tds_encoding` library and first
236-
encode value and then anotate it as `:binary` by calling `Ecto.Query.API.type/2`
236+
encode value and then annotate it as `:binary` by calling `Ecto.Query.API.type/2`
237237
in your query. This way all codepoints will be properly preserved during
238238
insert to database.
239239
"""

lib/mix/tasks/ecto.dump.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ defmodule Mix.Tasks.Ecto.Dump do
4545
* `-d`, `--dump-path` - the path of the dump file to create
4646
* `-q`, `--quiet` - run the command quietly
4747
* `--no-compile` - does not compile applications before dumping
48-
* `--no-deps-check` - does not check depedendencies before dumping
48+
* `--no-deps-check` - does not check dependencies before dumping
4949
"""
5050

5151
@impl true

lib/mix/tasks/ecto.gen.migration.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ defmodule Mix.Tasks.Ecto.Gen.Migration do
4646
4747
* `-r`, `--repo` - the repo to generate migration for
4848
* `--no-compile` - does not compile applications before running
49-
* `--no-deps-check` - does not check depedendencies before running
49+
* `--no-deps-check` - does not check dependencies before running
5050
* `--migrations-path` - the path to run the migrations from, defaults to `priv/repo/migrations`
5151
5252
## Configuration

lib/mix/tasks/ecto.load.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ defmodule Mix.Tasks.Ecto.Load do
5151
Configuration is asked only when `:start_permanent` is set to true
5252
(typically in production)
5353
* `--no-compile` - does not compile applications before loading
54-
* `--no-deps-check` - does not check depedendencies before loading
54+
* `--no-deps-check` - does not check dependencies before loading
5555
* `--skip-if-loaded` - does not load the dump file if the repo has the migrations table up
5656
"""
5757

lib/mix/tasks/ecto.migrate.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ defmodule Mix.Tasks.Ecto.Migrate do
8888
8989
* `--no-compile` - does not compile applications before migrating
9090
91-
* `--no-deps-check` - does not check depedendencies before migrating
91+
* `--no-deps-check` - does not check dependencies before migrating
9292
9393
* `--migrations-path` - the path to load the migrations from, defaults to
9494
`"priv/repo/migrations"`. This option may be given multiple times in which case the migrations

lib/mix/tasks/ecto.rollback.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ defmodule Mix.Tasks.Ecto.Rollback do
4141
config :my_app, MyApp.Repo, priv: "priv/custom_repo"
4242
4343
This task rolls back the last applied migration by default. To roll
44-
back to a version number, supply `--to version_number`. To roll
45-
back a specific number of times, use `--step n`. To undo all applied
44+
back to a version number, supply `--to version_number`. To roll
45+
back a specific number of times, use `--step n`. To undo all applied
4646
migrations, provide `--all`.
4747
4848
The repositories to rollback are the ones specified under the
@@ -82,7 +82,7 @@ defmodule Mix.Tasks.Ecto.Rollback do
8282
8383
* `--no-compile` - does not compile applications before rolling back
8484
85-
* `--no-deps-check` - does not check depedendencies before rolling back
85+
* `--no-deps-check` - does not check dependencies before rolling back
8686
8787
* `--migrations-path` - the path to load the migrations from, defaults to
8888
`"priv/repo/migrations"`. This option may be given multiple times in which case the migrations

0 commit comments

Comments
 (0)