Make Statement.setPagingSize method public#30
Conversation
|
|
||
| func setPagingSize(_ pagingSize: Int32) throws { | ||
| /// Sets the paging size of the returned paginated results. | ||
| public func setPagingSize(_ pagingSize: Int32) throws { |
There was a problem hiding this comment.
Can we use Int instead here? It should be preferred for public APIs.
There was a problem hiding this comment.
What is the rationale of using Int, besides the preference for public API?
Cassandra's native protocol accepts 32-bits int. From this perspective, Int32 reflects the API constraint precisely, meanwhile Int can be 64-bits depending on the platform, potentially causing overflow theoretically. In reality, no one should set the page size this large.
|
There is a variant of |
That one should ideally be I'd much rather we course correct and add appropriate APIs rather than being consistent with past mistakes. |
017c634 to
d183c0e
Compare
Make Statement.setPagingSize method public
Motivation:
In some cases we may need to change paging size to reduce chances of read timeouts
Modifications:
The method setPagingSize() existed but wasn't public so was inaccessible for clients
Result:
With this change it would become public and let a client to set custom paging sizes on per statement basis