Skip to content
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

Should enable streaming results #76

Closed
jraymakers opened this issue Dec 20, 2024 · 1 comment
Closed

Should enable streaming results #76

jraymakers opened this issue Dec 20, 2024 · 1 comment
Assignees

Comments

@jraymakers
Copy link
Contributor

The API doesn't currently allow creating streaming results. It should.

Details:

The run and start methods of DuckDBPreparedStatement return DuckDBPendingResults that are in non-streaming mode, because they use duckdb_execute_prepared and duckdb_pending_prepared, not duckdb_execute_prepared_streaming or duckdb_pending_prepared_streaming. The latter have "DEPRECATION NOTICE"s, which means they will likely be removed in the future, but it's likely they will be replace by some other way to create streaming results. So, they can be used with relatively low risk that the functionality will go away.

Probably DuckDBPreparedStatement should have new methods, stream and startStream, that use duckdb_execute_prepared_streaming and duckdb_pending_prepared_streaming to return DuckDBPendingResults that are in streaming mode.

There should also be an isStreaming (or streaming) boolean property on DuckDBResult that uses duckdb_result_is_streaming.

There's duckdb_stream_fetch_chunk function, but there seems to be no point in exposing it, because it just calls duckdb_fetch_chunk (after checking whether the argument is in streaming mode).

@jraymakers
Copy link
Contributor Author

This has been fixed in 1.1.3-alpha.8. See the updated README for details. Happy holidays! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant