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
Hi! I'm attempting to use $modify on create call to enable a onConflictIgnore type flag in postgresql. However, it doesn't look like the $modify is actually being applied.
Looking at the code, it appears that the createQuery call deletes the query parameters after it is used. However, in the _create flow that ends up calling _batchInsert, it appears createQuery is called twice. It is first called by _create, and then called again by _batchInsert. This results in the query parameters being deleted by the createQuery call within _create, and thus never making it to _batchInsert.
To me, it seems like there are two possible solutions: 1. pass the createQuery from _create into batchInsert. This works for the postgressql/mysql usecase, but not for the default case.
2. Don't delete query parameters in createQuery. I'm not sure what side effects this would cause, however.
On a second look at the code, it looks like create uses _createQuery instead of createQuery. This appears to complicate matters a bit...
The text was updated successfully, but these errors were encountered:
Hi! I'm attempting to use
$modify
oncreate
call to enable aonConflictIgnore
type flag in postgresql. However, it doesn't look like the$modify
is actually being applied.Looking at the code, it appears that thecreateQuery
call deletes the query parameters after it is used. However, in the_create
flow that ends up calling_batchInsert
, it appearscreateQuery
is called twice. It is first called by_create
, and then called again by_batchInsert
. This results in the query parameters being deleted by thecreateQuery
call within_create
, and thus never making it to_batchInsert
.To me, it seems like there are two possible solutions:1. pass thecreateQuery
from_create
intobatchInsert
. This works for the postgressql/mysql usecase, but not for the default case.2. Don't delete query parameters in
createQuery
. I'm not sure what side effects this would cause, however.On a second look at the code, it looks like
create
uses_createQuery
instead ofcreateQuery
. This appears to complicate matters a bit...The text was updated successfully, but these errors were encountered: