You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When inserting an entry in Postgres with an ON CONFLICT DO NOTHING twice the exec_insert method fails.
Steps to Reproduce
Running the following query twice with the same value will yield no return result in the second run:
INSERT INTO"url" ("url")
VALUES
($1) ON CONFLICT ("url") DO NOTHING RETURNING "id"
However, the function exec_insert expects a return value to exist on line 119 of src/executor/insert.rs. When running the query twice the program will crash with:
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', C:\Users\me\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\sea-orm-0.10.1\src\executor\insert.rs:119:54
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', C:\Users\me\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\sea-orm-0.10.1\src\executor\insert.rs:119:54
Reproduces How Often
Every time
Versions
sea-orm 0.10.1
(Note that the above shortcut to past in the console doesn't work in powershell)
The text was updated successfully, but these errors were encountered:
Description
When inserting an entry in Postgres with an
ON CONFLICT DO NOTHING
twice theexec_insert
method fails.Steps to Reproduce
Running the following query twice with the same value will yield no return result in the second run:
However, the function
exec_insert
expects a return value to exist on line119
ofsrc/executor/insert.rs
. When running the query twice the program will crash with:The sea-orm code that was used is:
Expected Behavior
I expect this query to work fine.
Actual Behavior
Reproduces How Often
Every time
Versions
sea-orm 0.10.1
(Note that the above shortcut to past in the console doesn't work in powershell)
The text was updated successfully, but these errors were encountered: