pbms_get_data_range
Description
pbms_bool pbms_get_data_range ( PBMS pbms ,const char * blob_ref ,size_t first_byte ,size_t last_byte ,unsigned char * buffer ,size_t size ,size_t * data_size )
Get a portion of a BLOB from the PBMS BLOB streaming daemon for the specified BLOB reference.
Parameters
pbms
A valid PBMS connection handle.
blob_ref
A BLOB reference for the data to be received.
first_byte
The offset of the first byte in the range of data to return.
last_byte
The offset of the last byte in the range of data to return.
buffer
A pointer to the buffer into which the BLOB data is to be placed.
size
The size of the buffer.
data_size
A pointer to a variable containing the size of the BLOB data returned. On return this variable will contain the number of bytes of BLOB data returned. If the caller is not interested in this value then NULL can be passed in.
Return Values

Returns TRUE on success.

Returns FALSE on failure. Use pbms_errno() and pbms_error() to retrieve error details.

Example
	pbms = pbms_connect("localhost", 8080, "aDatabase");

	// Fetch the BLOB back, 'name' is a LONGBLOB column.
	mysql_query(mysql, "select name from bobtest where id = 1");
	results = mysql_store_result(mysql);
			
	record = mysql_fetch_row(result);
	
	/* Get the first 10 bytes of the BLOB. */
	char buffer[10];

	pbms_get_data_range(pbms, record[0], 0, 9, buffer, 10, &data_size));

	if (data_size != 10)
		printf("OOPS! this is a bug!\n");
		
	pbms_close(pbms);
		
Related functions
pbms_get_data() pbms_get_data_cb() pbms_get_data_range_cb() pbms_put_data() pbms_put_data_cb()