MySQL  8.0.19
Source Code Documentation
dd::Raw_record Class Reference

#include <raw_record.h>

Inheritance diagram for dd::Raw_record:
dd::Raw_new_record dd::Raw_record_set

Public Member Functions

 Raw_record (TABLE *table)
 
bool update ()
 Update table record into SE. More...
 
bool drop ()
 Drop the record from SE. More...
 
bool store_pk_id (int field_no, Object_id id)
 
bool store_ref_id (int field_no, Object_id id)
 
bool store (int field_no, const String_type &s, bool is_null=false)
 
bool store (int field_no, ulonglong ull, bool is_null=false)
 
bool store (int field_no, longlong ll, bool is_null=false)
 
bool store (int field_no, bool b, bool is_null=false)
 
bool store (int field_no, uint v, bool is_null=false)
 
bool store (int field_no, int v, bool is_null=false)
 
bool store (int field_no, const Properties &p)
 
bool store_time (int field_no, my_time_t val, bool is_null=false)
 
bool store_timestamp (int field_no, const timeval &tv)
 Store timeval at field specified by field_no into the record. More...
 
bool store_json (int field_no, const Json_wrapper &json)
 
bool is_null (int field_no) const
 
longlong read_int (int field_no) const
 
longlong read_int (int field_no, longlong null_value) const
 
ulonglong read_uint (int field_no) const
 
ulonglong read_uint (int field_no, ulonglong null_value) const
 
String_type read_str (int field_no) const
 
String_type read_str (int field_no, const String_type &null_value) const
 
Object_id read_ref_id (int field_no) const
 
bool read_bool (int field_no) const
 
my_time_t read_time (int field_no) const
 
timeval read_timestamp (int field_no) const
 Read timeval stored at field specified by field_no from the record. More...
 
bool read_json (int field_no, Json_wrapper *json_wrapper) const
 

Protected Member Functions

void set_null (int field_no, bool is_null)
 
Fieldfield (int field_no) const
 

Protected Attributes

TABLEm_table
 

Constructor & Destructor Documentation

◆ Raw_record()

dd::Raw_record::Raw_record ( TABLE table)

Member Function Documentation

◆ drop()

bool dd::Raw_record::drop ( )

Drop the record from SE.

Returns
true - on failure and error is reported.
false - on success.

◆ field()

Field * dd::Raw_record::field ( int  field_no) const
protected

◆ is_null()

bool dd::Raw_record::is_null ( int  field_no) const

◆ read_bool()

bool dd::Raw_record::read_bool ( int  field_no) const
inline

◆ read_int() [1/2]

longlong dd::Raw_record::read_int ( int  field_no) const

◆ read_int() [2/2]

longlong dd::Raw_record::read_int ( int  field_no,
longlong  null_value 
) const
inline

◆ read_json()

bool dd::Raw_record::read_json ( int  field_no,
Json_wrapper json_wrapper 
) const

◆ read_ref_id()

Object_id dd::Raw_record::read_ref_id ( int  field_no) const

◆ read_str() [1/2]

String_type dd::Raw_record::read_str ( int  field_no) const

◆ read_str() [2/2]

String_type dd::Raw_record::read_str ( int  field_no,
const String_type null_value 
) const
inline

◆ read_time()

my_time_t dd::Raw_record::read_time ( int  field_no) const

◆ read_timestamp()

timeval dd::Raw_record::read_timestamp ( int  field_no) const

Read timeval stored at field specified by field_no from the record.

Parameters
field_noField position in the record.
Returns
timeval stored at field_no.

◆ read_uint() [1/2]

ulonglong dd::Raw_record::read_uint ( int  field_no) const

◆ read_uint() [2/2]

ulonglong dd::Raw_record::read_uint ( int  field_no,
ulonglong  null_value 
) const
inline

◆ set_null()

void dd::Raw_record::set_null ( int  field_no,
bool  is_null 
)
protected

◆ store() [1/7]

bool dd::Raw_record::store ( int  field_no,
bool  b,
bool  is_null = false 
)
inline

◆ store() [2/7]

bool dd::Raw_record::store ( int  field_no,
const Properties p 
)

◆ store() [3/7]

bool dd::Raw_record::store ( int  field_no,
const String_type s,
bool  is_null = false 
)

◆ store() [4/7]

bool dd::Raw_record::store ( int  field_no,
int  v,
bool  is_null = false 
)
inline

◆ store() [5/7]

bool dd::Raw_record::store ( int  field_no,
longlong  ll,
bool  is_null = false 
)

◆ store() [6/7]

bool dd::Raw_record::store ( int  field_no,
uint  v,
bool  is_null = false 
)
inline

◆ store() [7/7]

bool dd::Raw_record::store ( int  field_no,
ulonglong  ull,
bool  is_null = false 
)

◆ store_json()

bool dd::Raw_record::store_json ( int  field_no,
const Json_wrapper json 
)

◆ store_pk_id()

bool dd::Raw_record::store_pk_id ( int  field_no,
Object_id  id 
)

◆ store_ref_id()

bool dd::Raw_record::store_ref_id ( int  field_no,
Object_id  id 
)

◆ store_time()

bool dd::Raw_record::store_time ( int  field_no,
my_time_t  val,
bool  is_null = false 
)

◆ store_timestamp()

bool dd::Raw_record::store_timestamp ( int  field_no,
const timeval &  tv 
)

Store timeval at field specified by field_no into the record.

Parameters
field_noField position in the record.
tvTime value to store.
Returns
false on success true on failure

◆ update()

bool dd::Raw_record::update ( )

Update table record into SE.

Returns
true - on failure and error is reported.
false - on success.

We ignore HA_ERR_RECORD_IS_THE_SAME here for following reason. If in case we are updating childrens of some DD object, and only one of the children has really changed and other have not. Then we get HA_ERR_RECORD_IS_THE_SAME for children (rows) which has not really been modified.

Currently DD framework creates/updates all childrens at once and we don't have machinism to update only required child. May be this is part of task which will implement inplace alter in better way, updating only the changed child (or row) and ignore others. Then we can remove the below check which ignores HA_ERR_RECORD_IS_THE_SAME.

Member Data Documentation

◆ m_table

TABLE* dd::Raw_record::m_table
protected

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