|
As agreed during a discussion with Monty, let's change the Protocol API from:
virtual bool store(float nr, uint32 decimals, String *buffer);
|
virtual bool store(double from, uint32 decimals, String *buffer);
|
to
virtual bool store_float(float nr, uint32 decimals);
|
virtual bool store_double(double from, uint32 decimals);
|
I.e.:
- Remove the String* argument
- Rename store(float) and store(double) to store_float() and store_double(), to avoid ambiguity, and to avoid explicit cast in calls.
Rationale to remove the String* argument:
- It will make the code more symmetric across various data types.
Notice, other methods do not have any String buffer parameter:
virtual bool store_tiny(longlong from);
|
virtual bool store_short(longlong from);
|
virtual bool store_long(longlong from);
|
virtual bool store_longlong(longlong from, bool unsigned_flag);
|
virtual bool store_decimal(const my_decimal *);
|
virtual bool store_str(const char *from, size_t length,
|
CHARSET_INFO *fromcs,
|
CHARSET_INFO *tocs);
|
virtual bool store(MYSQL_TIME *time, int decimals);
|
virtual bool store_date(MYSQL_TIME *time);
|
virtual bool store_time(MYSQL_TIME *time, int decimals);
|
|