Skip to content

Commit ef00aa9

Browse files
committed
Update docs
1 parent ea9f2b3 commit ef00aa9

9 files changed

Lines changed: 30 additions & 26 deletions

File tree

lib/ecto/adapters/sql/sandbox.ex

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -264,14 +264,16 @@ defmodule Ecto.Adapters.SQL.Sandbox do
264264
each test retrieves locks desired by the other, leading to a situation
265265
that cannot be resolved, a deadlock. For instance:
266266
267-
Transaction 1: Transaction 2:
268-
begin
269-
begin
270-
update posts where id = 1
271-
update posts where id = 2
272-
update posts where id = 1
273-
update posts where id = 2
274-
**deadlock**
267+
```text
268+
Transaction 1: Transaction 2:
269+
begin
270+
begin
271+
update posts where id = 1
272+
update posts where id = 2
273+
update posts where id = 1
274+
update posts where id = 2
275+
**deadlock**
276+
```
275277
276278
There are different ways to avoid such problems. One of them is
277279
to make sure your tests work on distinct data. Regardless of

lib/ecto/migration.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ defmodule Ecto.Migration do
3232
3333
Each file in the migrations directory has the following structure:
3434
35-
NUMBER_NAME.exs
35+
```text
36+
NUMBER_NAME.exs
37+
```
3638
3739
The NUMBER is a unique number that identifies the migration. It is
3840
usually the timestamp of when the migration was created. The NAME

lib/mix/tasks/ecto.dump.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ defmodule Mix.Tasks.Ecto.Dump do
3737
3838
## Example
3939
40-
mix ecto.dump
40+
$ mix ecto.dump
4141
4242
## Command line options
4343

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ defmodule Mix.Tasks.Ecto.Gen.Migration do
2828
2929
## Examples
3030
31-
mix ecto.gen.migration add_posts_table
32-
mix ecto.gen.migration add_posts_table -r Custom.Repo
31+
$ mix ecto.gen.migration add_posts_table
32+
$ mix ecto.gen.migration add_posts_table -r Custom.Repo
3333
3434
The generated migration filename will be prefixed with the current
3535
timestamp in UTC which is used for versioning and ordering.

lib/mix/tasks/ecto.load.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ defmodule Mix.Tasks.Ecto.Load do
4040
4141
## Example
4242
43-
mix ecto.load
43+
$ mix ecto.load
4444
4545
## Command line options
4646

lib/mix/tasks/ecto.migrate.ex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ defmodule Mix.Tasks.Ecto.Migrate do
5858
5959
## Examples
6060
61-
mix ecto.migrate
62-
mix ecto.migrate -r Custom.Repo
61+
$ mix ecto.migrate
62+
$ mix ecto.migrate -r Custom.Repo
6363
64-
mix ecto.migrate -n 3
65-
mix ecto.migrate --step 3
64+
$ mix ecto.migrate -n 3
65+
$ mix ecto.migrate --step 3
6666
67-
mix ecto.migrate --to 20080906120000
67+
$ mix ecto.migrate --to 20080906120000
6868
6969
## Command line options
7070

lib/mix/tasks/ecto.migrations.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ defmodule Mix.Tasks.Ecto.Migrations do
3232
3333
## Examples
3434
35-
mix ecto.migrations
36-
mix ecto.migrations -r Custom.Repo
35+
$ mix ecto.migrations
36+
$ mix ecto.migrations -r Custom.Repo
3737
3838
## Command line options
3939

lib/mix/tasks/ecto.rollback.ex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ defmodule Mix.Tasks.Ecto.Rollback do
5454
5555
## Examples
5656
57-
mix ecto.rollback
58-
mix ecto.rollback -r Custom.Repo
57+
$ mix ecto.rollback
58+
$ mix ecto.rollback -r Custom.Repo
5959
60-
mix ecto.rollback -n 3
61-
mix ecto.rollback --step 3
60+
$ mix ecto.rollback -n 3
61+
$ mix ecto.rollback --step 3
6262
63-
mix ecto.rollback --to 20080906120000
63+
$ mix ecto.rollback --to 20080906120000
6464
6565
## Command line options
6666

mix.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"deep_merge": {:hex, :deep_merge, "0.2.0", "c1050fa2edf4848b9f556fba1b75afc66608a4219659e3311d9c9427b5b680b3", [:mix], [], "hexpm", "e3bf435a54ed27b0ba3a01eb117ae017988804e136edcbe8a6a14c310daa966e"},
88
"earmark_parser": {:hex, :earmark_parser, "1.4.13", "0c98163e7d04a15feb62000e1a891489feb29f3d10cb57d4f845c405852bbef8", [:mix], [], "hexpm", "d602c26af3a0af43d2f2645613f65841657ad6efc9f0e361c3b6c06b578214ba"},
99
"ecto": {:git, "https://github.com/elixir-ecto/ecto.git", "47ae9c8dcf8d6cdd5e67d18c0f56664b66d054f8", []},
10-
"ex_doc": {:hex, :ex_doc, "0.24.2", "e4c26603830c1a2286dae45f4412a4d1980e1e89dc779fcd0181ed1d5a05c8d9", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "e134e1d9e821b8d9e4244687fb2ace58d479b67b282de5158333b0d57c6fb7da"},
10+
"ex_doc": {:hex, :ex_doc, "0.25.1", "4b736fa38dc76488a937e5ef2944f5474f3eff921de771b25371345a8dc810bc", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "3200b0a69ddb2028365281fbef3753ea9e728683863d8cdaa96580925c891f67"},
1111
"jason": {:hex, :jason, "1.2.2", "ba43e3f2709fd1aa1dce90aaabfd039d000469c05c56f0b8e31978e03fa39052", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "18a228f5f0058ee183f29f9eae0805c6e59d61c3b006760668d8d18ff0d12179"},
1212
"makeup": {:hex, :makeup, "1.0.5", "d5a830bc42c9800ce07dd97fa94669dfb93d3bf5fcf6ea7a0c67b2e0e4a7f26c", [:mix], [{:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cfa158c02d3f5c0c665d0af11512fed3fba0144cf1aadee0f2ce17747fba2ca9"},
1313
"makeup_elixir": {:hex, :makeup_elixir, "0.15.1", "b5888c880d17d1cc3e598f05cdb5b5a91b7b17ac4eaf5f297cb697663a1094dd", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.1", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "db68c173234b07ab2a07f645a5acdc117b9f99d69ebf521821d89690ae6c6ec8"},

0 commit comments

Comments
 (0)