#include <binlog_storage_iterator.h>
◆ deinit
Destroys the iterator and releases resources associated with it.
- Parameters
-
[in] | iterator | the iterator to destroy. |
◆ get
Shall get the next event in the iterator.
Gets the next event in the iterator. If there are no more events in the iterator, it just returns immediately. Note that this function will also advance the iterator if the operation is successful or the next entries are to be skipped.
In case the error is kBinlogIteratorGetErrorInvalid or kBinlogIteratorGetErrorUnspecified the iterator must be de initialized by calling deinit. If the caller attempts to call get again, then the same error is returned.
- Parameters
-
| iterator | the iterator reference to use use during the get operation. |
[in,out] | buffer | the buffer to store the raw change stream bytes for the next entry fetched from the given iterator. |
[in] | buffer_capacity | the capacity of the buffer where the bytes are to be stored. |
[out] | bytes_read | the amount of bytes read and put into the buffer. |
- Return values
-
kBinlogIteratorGetOk | Binlog_iterator_service_get_status::kBinlogIteratorGetOk |
kBinlogIteratorGetEndOfChanges | Binlog_iterator_service_get_status::kBinlogIteratorGetEndOfChanges |
kBinlogIteratorGetInsufficientBuffer | Binlog_iterator_service_get_status::kBinlogIteratorGetInsufficientBuffer |
kBinlogIteratorGetErrorClosed | |
- See also
- Binlog_iterator_service_get_status::kBinlogIteratorGetErrorClosed
- Return values
-
kBinlogIteratorGetErrorInvalid | |
- See also
- Binlog_iterator_service_get_status::kBinlogIteratorGetErrorInvalid
- Return values
-
kBinlogIteratorGetErrorUnspecified | |
- See also
- Binlog_iterator_service_get_status::kBinlogIteratorGetErrorUnspecified
◆ get_next_entry_size
Gets the size of the next entry to fetch from the iterator.
Useful to drive reallocations.
- Parameters
-
[in] | iterator | the iterator being operated. |
[out] | size | a pointer to store the size of the next entry to get. |
- Returns
- false on success, true otherwise. Note that if the iterator has reached the end of changes, then it means that an error shall be returned.
◆ get_storage_details
Gets details about the entry's storage in a JSON format.
Allows the caller to get information about the underlying storage. Some implementations may return a name and a position, for instance.
- Parameters
-
[in] | iterator | the iterator handle. |
[in,out] | buffer | The buffer to store the information in. |
[in,out] | size | As input, the size of the buffer provided. As output, the size of the data copied into the buffer. |
- Returns
- true if there was an error, false otherwise.
◆ init
Initializes the iterator.
my_h_binlog_storage_iterator is the service handle defined and is an opaque pointer to the stream state.
- Parameters
-
[out] | iterator | where the iterator created will be stored. |
[in] | excluded_gtids_as_string | The set of GTIDs to filter out from the iterator. |
- Return values
-
- See also
- Binlog_iterator_service_init_status::kBinlogIteratorInitOk
- Return values
-
kBinlogIteratorIniErrorPurgedGtids | |
- See also
- Binlog_iterator_service_init_status::kBinlogIteratorIniErrorPurgedGtids
- Return values
-
kBinlogIteratorInitErrorLogClosed | |
- See also
- Binlog_iterator_service_init_status::kBinlogIteratorInitErrorLogClosed
- Return values
-
kBinlogIteratorInitErrorUnspecified | |
- See also
- Binlog_iterator_service_init_status::kBinlogIteratorGetErrorUnspecified
The documentation for this struct was generated from the following file: