Closed aileo closed 3 years ago
At this point, using refresh 'wait_for'
and CTE allow to get the full document back with a join:
using schema from tests
WITH
inserted AS (
INSERT INTO articles_es_wait_for (id, title, body)
VALUES (2, 'test title', 'test body') RETURNING id
)
SELECT es.id, es.title, es.body FROM inserted
LEFT JOIN articles_es_wait_for as es ON es.id = inserted.id;
-- > 2 | test title | test body
Should the full return be implemented as this workaround if pretty light and save a call?
It doesn't really save a call? You still have to query the fdw to get the data.
This is where invoking the read method with the ids would be appropriate. I'm happy to take this on if you don't want to handle that.
It doesn't really save a call? You still have to query the fdw to get the data.
Sorry, I don't know how I could think it save something...
This is where invoking the read method with the ids would be appropriate. I'm happy to take this on if you don't want to handle that.
I will let you go on then, I have no idea where to start :)
I should be able to work on this a bit tonight.
I've ended up smashing a few unrelated changes in here too.
related to #13
refresh
parameterTrue
,wait_for
orFalse
, default and fallback toFalse
es.index