diff --git a/integration_test/sql/alter.exs b/integration_test/sql/alter.exs index 5c167308c..b7ec65549 100644 --- a/integration_test/sql/alter.exs +++ b/integration_test/sql/alter.exs @@ -70,7 +70,7 @@ defmodule Ecto.Integration.AlterTest do assert :ok == run(:down, PoolRepo, AlterMigrationOne) end - test "reset cache on parameterised query after alter column type" do + test "reset cache on parameterized query after alter column type" do values = from v in "alter_col_type" assert :ok == run(:up, PoolRepo, AlterMigrationOne) diff --git a/lib/ecto/adapters/sql.ex b/lib/ecto/adapters/sql.ex index 95becc9ca..2edb6edbe 100644 --- a/lib/ecto/adapters/sql.ex +++ b/lib/ecto/adapters/sql.ex @@ -27,7 +27,7 @@ defmodule Ecto.Adapters.SQL do * `mix ecto.migrate` - runs a migration * `mix ecto.rollback` - rolls back a previously run migration - If you want to run migrations programatically, see `Ecto.Migrator`. + If you want to run migrations programmatically, see `Ecto.Migrator`. ## SQL sandbox diff --git a/lib/ecto/adapters/tds.ex b/lib/ecto/adapters/tds.ex index 2b0e44867..0f344f556 100644 --- a/lib/ecto/adapters/tds.ex +++ b/lib/ecto/adapters/tds.ex @@ -60,7 +60,7 @@ defmodule Ecto.Adapters.Tds do ### UUIDs - MSSQL server has slightly different binary storage format for UUIDs (`uniqueidenitifer`). + MSSQL server has slightly different binary storage format for UUIDs (`uniqueidentifier`). If you use `:binary_id`, the proper choice is made. Otherwise you must use the `Tds.Ecto.UUID` type. Avoid using `Ecto.UUID` since it may cause unpredictable application behaviour. @@ -75,9 +75,9 @@ defmodule Ecto.Adapters.Tds do codepage. - If you need other than Latin1 or other than your database default collation, as - mentioned in "Storage Options" section, then manualy encode strings using + mentioned in "Storage Options" section, then manually encode strings using `Tds.Encoding.encode/2` into desired codepage and then tag parameter as `:binary`. - Please be aware that queries that use this approach in where calues can be 10x slower + Please be aware that queries that use this approach in where clauses can be 10x slower due increased logical reads in database. - You can't store VarChar codepoints encoded in one collation/codepage to column that @@ -123,7 +123,7 @@ defmodule Ecto.Adapters.Tds do Ecto.Adapter.SQL.query("SET TRANSACTION ISOLATION LEVEL XYZ") will fail once explicit transaction is started using `c:Ecto.Repo.transaction/2` - and reset back to :read_commited. + and reset back to :read_committed. There is `Ecto.Query.lock/3` function can help by setting it to `WITH(NOLOCK)`. This should allow you to do eventually consistent reads and avoid locks on given diff --git a/lib/ecto/adapters/tds/connection.ex b/lib/ecto/adapters/tds/connection.ex index 83b675bf5..669b3a8e4 100644 --- a/lib/ecto/adapters/tds/connection.ex +++ b/lib/ecto/adapters/tds/connection.ex @@ -683,7 +683,7 @@ if Code.ensure_loaded?(Tds) do Enum.map_join(fields, ", ", &"#{name}.#{quote_name(&1)}") end - # eaxmple from {:in, [], [1, {:^, [], [0, 0]}]} + # example from {:in, [], [1, {:^, [], [0, 0]}]} defp expr({:in, _, [_left, []]}, _sources, _query) do "0=1" end @@ -806,7 +806,7 @@ if Code.ensure_loaded?(Tds) do end defp expr(%Decimal{exp: exp} = decimal, _sources, _query) do - # this should help gaining precision for decimals values embeded in query + # this should help gaining precision for decimals values embedded in query # but this is still not good enough, for instance: # # from(p in Post, select: type(2.0 + ^"2", p.cost()))) @@ -819,7 +819,7 @@ if Code.ensure_loaded?(Tds) do # FROM [posts] AS p0 # # as long as we have CAST(... as DECIMAL) without precision and scale - # value could be trucated + # value could be truncated [ "CAST(", Decimal.to_string(decimal, :normal), @@ -1478,7 +1478,7 @@ if Code.ensure_loaded?(Tds) do defp quote_name(name) do if String.contains?(name, ["[", "]"]) do - error!(nil, "bad field name #{inspect(name)} '[' and ']' are not permited") + error!(nil, "bad field name #{inspect(name)} '[' and ']' are not permitted") end "[#{name}]" @@ -1501,7 +1501,7 @@ if Code.ensure_loaded?(Tds) do defp quote_table(name) do if String.contains?(name, "[") or String.contains?(name, "]") do - error!(nil, "bad table name #{inspect(name)} '[' and ']' are not permited") + error!(nil, "bad table name #{inspect(name)} '[' and ']' are not permitted") end "[#{name}]" @@ -1523,7 +1523,7 @@ if Code.ensure_loaded?(Tds) do defp unquoted_name(name) do if String.contains?(name, ["[", "]"]) do - error!(nil, "bad table name #{inspect(name)} '[' and ']' are not permited") + error!(nil, "bad table name #{inspect(name)} '[' and ']' are not permitted") end name diff --git a/lib/ecto/adapters/tds/types.ex b/lib/ecto/adapters/tds/types.ex index 5aa3c9e6e..937b7ef97 100644 --- a/lib/ecto/adapters/tds/types.ex +++ b/lib/ecto/adapters/tds/types.ex @@ -16,7 +16,7 @@ if Code.ensure_loaded?(Tds) do @type t :: <<_::288>> @typedoc """ - A raw binary represenation of a UUID. + A raw binary representation of a UUID. """ @type raw :: <<_::128>> @@ -233,7 +233,7 @@ if Code.ensure_loaded?(Tds) do Please be aware of this limitation if you plan to store varchar values in your database using Ecto since you will probably lose some codepoints in the value during encoding. Instead use `tds_encoding` library and first - encode value and then anotate it as `:binary` by calling `Ecto.Query.API.type/2` + encode value and then annotate it as `:binary` by calling `Ecto.Query.API.type/2` in your query. This way all codepoints will be properly preserved during insert to database. """ diff --git a/lib/mix/tasks/ecto.dump.ex b/lib/mix/tasks/ecto.dump.ex index 2e687486c..a00fad1b2 100644 --- a/lib/mix/tasks/ecto.dump.ex +++ b/lib/mix/tasks/ecto.dump.ex @@ -45,7 +45,7 @@ defmodule Mix.Tasks.Ecto.Dump do * `-d`, `--dump-path` - the path of the dump file to create * `-q`, `--quiet` - run the command quietly * `--no-compile` - does not compile applications before dumping - * `--no-deps-check` - does not check depedendencies before dumping + * `--no-deps-check` - does not check dependencies before dumping """ @impl true diff --git a/lib/mix/tasks/ecto.gen.migration.ex b/lib/mix/tasks/ecto.gen.migration.ex index 7baa99ea8..15172fa00 100644 --- a/lib/mix/tasks/ecto.gen.migration.ex +++ b/lib/mix/tasks/ecto.gen.migration.ex @@ -46,7 +46,7 @@ defmodule Mix.Tasks.Ecto.Gen.Migration do * `-r`, `--repo` - the repo to generate migration for * `--no-compile` - does not compile applications before running - * `--no-deps-check` - does not check depedendencies before running + * `--no-deps-check` - does not check dependencies before running * `--migrations-path` - the path to run the migrations from, defaults to `priv/repo/migrations` ## Configuration diff --git a/lib/mix/tasks/ecto.load.ex b/lib/mix/tasks/ecto.load.ex index f46f44945..d8c2ae11f 100644 --- a/lib/mix/tasks/ecto.load.ex +++ b/lib/mix/tasks/ecto.load.ex @@ -51,7 +51,7 @@ defmodule Mix.Tasks.Ecto.Load do Configuration is asked only when `:start_permanent` is set to true (typically in production) * `--no-compile` - does not compile applications before loading - * `--no-deps-check` - does not check depedendencies before loading + * `--no-deps-check` - does not check dependencies before loading * `--skip-if-loaded` - does not load the dump file if the repo has the migrations table up """ diff --git a/lib/mix/tasks/ecto.migrate.ex b/lib/mix/tasks/ecto.migrate.ex index 3855455f1..ef7c86706 100644 --- a/lib/mix/tasks/ecto.migrate.ex +++ b/lib/mix/tasks/ecto.migrate.ex @@ -88,7 +88,7 @@ defmodule Mix.Tasks.Ecto.Migrate do * `--no-compile` - does not compile applications before migrating - * `--no-deps-check` - does not check depedendencies before migrating + * `--no-deps-check` - does not check dependencies before migrating * `--migrations-path` - the path to load the migrations from, defaults to `"priv/repo/migrations"`. This option may be given multiple times in which case the migrations diff --git a/lib/mix/tasks/ecto.rollback.ex b/lib/mix/tasks/ecto.rollback.ex index 0025b40f7..f8da0ba26 100644 --- a/lib/mix/tasks/ecto.rollback.ex +++ b/lib/mix/tasks/ecto.rollback.ex @@ -41,8 +41,8 @@ defmodule Mix.Tasks.Ecto.Rollback do config :my_app, MyApp.Repo, priv: "priv/custom_repo" This task rolls back the last applied migration by default. To roll - back to a version number, supply `--to version_number`. To roll - back a specific number of times, use `--step n`. To undo all applied + back to a version number, supply `--to version_number`. To roll + back a specific number of times, use `--step n`. To undo all applied migrations, provide `--all`. The repositories to rollback are the ones specified under the @@ -82,7 +82,7 @@ defmodule Mix.Tasks.Ecto.Rollback do * `--no-compile` - does not compile applications before rolling back - * `--no-deps-check` - does not check depedendencies before rolling back + * `--no-deps-check` - does not check dependencies before rolling back * `--migrations-path` - the path to load the migrations from, defaults to `"priv/repo/migrations"`. This option may be given multiple times in which case the migrations