This PR introduces a new method last_result_size to the Trilogy gem's Ruby bindings. This method allows users to retrieve the exact byte size of the last result received from a query. The byte size includes not only the raw data but also headers, metadata, and any other protocol overhead.
Main changes:
- Added a new method `rb_trilogy_last_result_size` to surface the `conn.recv_buff_len` as a Ruby method.
Note on the test
The test checks that the last_result_size falls within a specific range (150 to 170 bytes). The reason for using a range instead of an exact value is to account for potential changes in the future. For example, changes in how headers or metadata are sent could affect the total byte size. The range provides a buffer to accommodate any of these changes.
Add
last_result_size
to ruby bindingsThis PR introduces a new method
last_result_size
to the Trilogy gem's Ruby bindings. This method allows users to retrieve the exact byte size of the last result received from a query. The byte size includes not only the raw data but also headers, metadata, and any other protocol overhead.Main changes:
Note on the test
The test checks that the
last_result_size
falls within a specific range (150 to 170 bytes). The reason for using a range instead of an exact value is to account for potential changes in the future. For example, changes in how headers or metadata are sent could affect the total byte size. The range provides a buffer to accommodate any of these changes.