MySQL  8.0.19
Source Code Documentation
Binary_diff Class Referencefinal

Class that represents a single change to a column value in partial update of a JSON column. More...

#include <table.h>

Public Member Functions

 Binary_diff (size_t offset, size_t length)
 Create a new Binary_diff object. More...
 
size_t offset () const
 
size_t length () const
 
const char * new_data (Field *field) const
 Get a pointer to the start of the replacement data. More...
 
const char * old_data (Field *field) const
 Get a pointer to the start of the old data to be replaced. More...
 

Private Attributes

size_t m_offset
 The offset of the start of the change. More...
 
size_t m_length
 The size of the portion that is to be replaced. More...
 

Detailed Description

Class that represents a single change to a column value in partial update of a JSON column.

Constructor & Destructor Documentation

◆ Binary_diff()

Binary_diff::Binary_diff ( size_t  offset,
size_t  length 
)
inline

Create a new Binary_diff object.

Parameters
offsetthe offset of the beginning of the change
lengththe length of the section that is to be replaced

Member Function Documentation

◆ length()

size_t Binary_diff::length ( ) const
inline
Returns
the length of the changed data

◆ new_data()

const char * Binary_diff::new_data ( Field field) const

Get a pointer to the start of the replacement data.

Parameters
fieldthe column that is updated
Returns
a pointer to the start of the replacement data

◆ offset()

size_t Binary_diff::offset ( ) const
inline
Returns
the offset of the changed data

◆ old_data()

const char * Binary_diff::old_data ( Field field) const

Get a pointer to the start of the old data to be replaced.

Parameters
fieldthe column that is updated
Returns
a pointer to the start of old data to be replaced.

Member Data Documentation

◆ m_length

size_t Binary_diff::m_length
private

The size of the portion that is to be replaced.

◆ m_offset

size_t Binary_diff::m_offset
private

The offset of the start of the change.


The documentation for this class was generated from the following files: