mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-20 13:33:50 +12:00
chore: fix bulk upserts
This commit is contained in:
parent
08a0a926e5
commit
2bf6725fcb
2 changed files with 2 additions and 3 deletions
|
@ -1094,7 +1094,6 @@ defmodule AshPostgres.DataLayer do
|
||||||
end
|
end
|
||||||
rescue
|
rescue
|
||||||
e ->
|
e ->
|
||||||
IO.inspect(e)
|
|
||||||
{:error, Ash.Error.to_ash_error(e)}
|
{:error, Ash.Error.to_ash_error(e)}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -40,12 +40,12 @@ defmodule AshPostgres.BulkCreateTest do
|
||||||
|
|
||||||
assert [
|
assert [
|
||||||
{:ok, %{title: "fred", uniq_one: "one", uniq_two: "two", price: 1000}},
|
{:ok, %{title: "fred", uniq_one: "one", uniq_two: "two", price: 1000}},
|
||||||
{:ok, %{title: "george", uniq_one: "three", uniq_two: "four", price: 20000}}
|
{:ok, %{title: "george", uniq_one: "three", uniq_two: "four", price: 20_000}}
|
||||||
] =
|
] =
|
||||||
Api.bulk_create!(
|
Api.bulk_create!(
|
||||||
[
|
[
|
||||||
%{title: "something", uniq_one: "one", uniq_two: "two", price: 1000},
|
%{title: "something", uniq_one: "one", uniq_two: "two", price: 1000},
|
||||||
%{title: "else", uniq_one: "three", uniq_two: "four", price: 20000}
|
%{title: "else", uniq_one: "three", uniq_two: "four", price: 20_000}
|
||||||
],
|
],
|
||||||
Post,
|
Post,
|
||||||
:create,
|
:create,
|
||||||
|
|
Loading…
Reference in a new issue