Skip to content

Commit

Permalink
mix format
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Mar 30, 2024
1 parent ff417bd commit 5eff0b4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/postgrex/protocol.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ defmodule Postgrex.Protocol do
@max_rows 500
@text_type_oid 25
@commit_comment_validation_error Postgrex.Error.exception(
message: "`:commit_comment` option cannot contain sequence \"*/\""
message:
"`:commit_comment` option cannot contain sequence \"*/\""
)

defstruct sock: nil,
Expand Down
2 changes: 1 addition & 1 deletion test/query_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ defmodule QueryTest do
end

test "iodata", context do
assert [[123]] = query(["S", ?E, ["LEC" | "T"], " ", '123'], [])
assert [[123]] = query(["S", ?E, ["LEC" | "T"], " ", ~c"123"], [])
end

test "decode basic types", context do
Expand Down
8 changes: 6 additions & 2 deletions test/transaction_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,9 @@ defmodule TransactionTest do
assert transaction(
fn conn ->
assert {:error, %Postgrex.Error{postgres: %{code: :unique_violation}}} =
P.query(conn, "insert into uniques values (1), (1);", [], mode: :savepoint)
P.query(conn, "insert into uniques values (1), (1);", [],
mode: :savepoint
)

assert {:ok, %Postgrex.Result{rows: [[42]]}} = P.query(conn, "SELECT 42", [])
:hi
Expand Down Expand Up @@ -593,7 +595,9 @@ defmodule TransactionTest do
assert transaction(
fn conn ->
assert {:error, %Postgrex.Error{postgres: %{code: :unique_violation}}} =
P.query(conn, "insert into uniques values (1), (1);", [], mode: :savepoint)
P.query(conn, "insert into uniques values (1), (1);", [],
mode: :savepoint
)

assert {:ok, %Postgrex.Result{rows: [[42]]}} = P.query(conn, "SELECT 42", [])
:hi
Expand Down

0 comments on commit 5eff0b4

Please sign in to comment.