During a reconnect we are losing the connection and when the
realLastInsertId call is the one triggering the reconnect, it
does not return the ID. But inside the reconnect, we were able
to save the last insert id, so calling it a second time is going
to be successful.
We can not return the result on the initial call, as we are already
way deeper in the stack performing the actual database query on
the doctrine driver.
Signed-off-by: Joas Schilling <coding@schilljs.com>
The workaround was required because "ON CONFLICT DO NOTHING" was added with pqsql 9.5.
PostgreSQL 9.4 is eol since 2020-02-13 and thus everyone should use a version with upsert support nowadays.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>