-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibility to emit indices in bulk action with return_stream?: true
#1367
Comments
We should consider if we'd rather add the option |
We would synthesize the indices based on batch sizes, so we won't have to return records |
Like add the next 500 integers to the stream. |
I don't think we always can. If it is an upsert, we won't know which indexes were created and which not, right? |
🤔 I was thinking that |
@zachdaniel I think that would be confusing given that it would also not show up in the result records... |
🤔 potentially. It could be confusing the other way around as well, like if you do huge bulk upsert and everything is match and you get back Perhaps for future proof-ness we should do something like |
That sounds like a good compromise :) |
Started working on a PR. |
Is your feature request related to a problem? Please describe.
I'm writing a Mix task, which imports a large file via a bulk insert. To display progress, I would like to be able to log a message every n entries so that I can see the progress. TO do this, I have to enable
return_records?
at the moment. This uses memory unnecessarily.Describe the solution you'd like
A new option
emit_indices?
which will return the current index instead of the whole record. Only available whenreturn_stream?: true
andreturn_records?: false
.Describe alternatives you've considered
None
Express the feature either with a change to resource syntax, or with a change to the resource interface
For example
Additional context
None
The text was updated successfully, but these errors were encountered: