[MDEV-12426] Add Field::type_handler() Created: 2017-04-02  Updated: 2017-05-17  Resolved: 2017-04-25

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Fix Version/s: 10.3.1

Type: Task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: datatype

Issue Links:
Blocks
blocks MDEV-4912 Data type plugin API version 1 Closed
Relates
relates to MDEV-9398 Add Type_handler::cast_to_int_type Closed

 Description   

Under terms of this task we'll add a new method into the class Field, for symmetry with the class Item:

virtual const Type_handler *type_handler() const;

We'll also change methods Field::type(), Field::real_type(), Field::cmp_type(), Field::result_type() to be non-virtual, they will use the corresponding type_handler() methods as follows:

enum_field_types type() const
{
  return type_handler()->field_type();
}
enum_field_types real_type() const
{
  return type_handler()->real_field_type();
}
Item_result result_type () const
{
  return type_handler()->result_type();
}
Item_result cmp_type () const
{
  return type_handler()->cmp_type();
}

We'll also move the virtual method Field::cast_to_int_type_handler() from Field to Type_handler.

We won't change or move Field::binlog_type() for now. It will be done in a separate task.



 Comments   
Comment by Vicențiu Ciorbaru [ 2017-04-24 ]

Ok to push once comments are addressed.

Comment by Alexander Barkov [ 2017-04-25 ]

Pushed to bb-10.2-ext

Generated at Thu Feb 08 07:57:37 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.