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

How to use mysql streams? #1029

Open
ajinkyapisal opened this issue Aug 28, 2019 · 1 comment
Open

How to use mysql streams? #1029

ajinkyapisal opened this issue Aug 28, 2019 · 1 comment

Comments

@ajinkyapisal
Copy link

ajinkyapisal commented Aug 28, 2019

Does this library provide a method for accessing MySQL stream similar to mysql2 adapter?

Sources:
Mysql2 Adapter - https://github.com/brianmario/mysql2#streaming
Mysql documentation - https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-implementation-notes.html

@ajinkyapisal ajinkyapisal changed the title How to use mysql streams with this library? How to use mysql streams? Aug 28, 2019
@kares
Copy link
Member

kares commented Sep 30, 2019

you can access the jdbc connection from your AR connection: connection.jdbc_connection
from there you could create a statement and set stmt.setFetchSize(Integer.MIN_VALUE)

not sure whether where we should add that since we do not emulate the mysql2 API that much
client.query("SELECT * FROM really_big_Table", :stream => true) we simply do not have that as AR-JDBC implements AR API: connection.exec_query not sure it makes sense to make that streamable?

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

2 participants