Closed danturu closed 8 years ago
@rosendi:
I see it in the documentation, but not in the source code
The only similar things I can find in the docs are the on()
method which is passed a join criteria object and only works with the JOIN
methods (INNER JOIN ... ON ...
, CROSS JOIN ... ON ...
, etc), not with CONFLICT
, and the orReplace()
method which is how you do an upsert in the SQLite dialect. It has a lingering table of contents entry but has been removed from the documentation itself because it is now only available in the https://github.com/CSNW/sql-bricks-sqlite extension library.
It looks to me like the ON CONFLICT
statement is postgres-specific. If so, it would belong in @Suor's postgres extension (https://github.com/Suor/sql-bricks-postgres) -- perhaps you saw something about it in his repo? (I looked, but didn't find anything)
@prust Thank you! You are correct, the statement is postgres-specific. I misunderstood the orReplace()
method. Now I see that the issue is related to the sql-bricks-postgres
package.
Does it support queries like
INSERT INTO queries(...) VALUES(...) ON CONFLICT(...) DO update SET ...
?I see it in the documentation, but not in the source code.