Skip to content

Add prefetch rows tweakable #40

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

Closed
wants to merge 2 commits into from
Closed

Add prefetch rows tweakable #40

wants to merge 2 commits into from

Conversation

daviessm
Copy link
Contributor

Partially fixes #39

/// By default, a maximum of 2 rows are returned when the query is first
/// executed. To modify this, use `StmtParam::PrefetchRows(u32)` to customize
/// it. For more information on the difference between this and `FetchArraySize`,
/// see [this writeup](https://blog.dbi-services.com/arraysize-or-rowprefetch-in-sqlplus/).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/statement.rs Outdated
@@ -59,6 +59,17 @@ pub enum StmtParam {
/// `StmtParam::FetchArraySize(1)`.
FetchArraySize(u32),

/// The number of rows that will be prefetched by the Oracle Client
/// ibrary when a query is executed. The default value is
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: ibrary

@kubo
Copy link
Owner

kubo commented Jun 26, 2021

@daviessm Thanks for the PR and sorry for not replying so long.

I don't merge this PR because the new variant PrefetchRows causes a breaking change. I added a new method Connection.statement(), which doesn't cause a breaking change when a new parameter is added. Could you make a new pull request which adds the prefetch_rows() method to StatementBuilder? Otherwise, may I do it based on your PR?

@daviessm
Copy link
Contributor Author

I'm happy either way - if it's easier for you to do it yourself, go for it!

kubo added a commit that referenced this pull request Jun 27, 2021
This is based on the pull request #40 contributed by @daviessm.
@kubo
Copy link
Owner

kubo commented Jun 27, 2021

I did it by 7ec5577, which closes this PR.

@kubo kubo closed this Jun 27, 2021
@daviessm daviessm deleted the prefetch_rows branch June 30, 2021 19:51
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

Successfully merging this pull request may close these issues.

Request for setting statement properties ROW_PREFETCH and LOBPREFETCH_SIZE
3 participants