My Project
Public Member Functions | Protected Member Functions
Field_longstr Class Reference
Inheritance diagram for Field_longstr:
Field_str Field Field_blob Field_string Field_varstring

List of all members.

Public Member Functions

 Field_longstr (uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, utype unireg_check_arg, const char *field_name_arg, const CHARSET_INFO *charset_arg)
type_conversion_status store_decimal (const my_decimal *d)
uint32 max_data_length () const

Protected Member Functions

type_conversion_status report_if_important_data (const char *ptr, const char *end, bool count_spaces) const
type_conversion_status check_string_copy_error (const char *well_formed_error_pos, const char *cannot_convert_error_pos, const char *from_end_pos, const char *end, bool count_spaces, const CHARSET_INFO *cs) const

Member Function Documentation

type_conversion_status Field_longstr::check_string_copy_error ( const char *  well_formed_error_pos,
const char *  cannot_convert_error_pos,
const char *  from_end_pos,
const char *  end,
bool  count_spaces,
const CHARSET_INFO *  cs 
) const [protected]

Report "not well formed" or "cannot convert" error after storing a character string info a field.

As of version 5.0 both cases return the same error:

"Invalid string value: 'xxx' for column 't' at row 1"

Future versions will possibly introduce a new error message:

"Cannot convert character string: 'xxx' for column 't' at row 1"

Parameters:
well_formed_error_posposition of the first non-wellformed character in the source string
cannot_convert_error_posposition of the first non-convertable character in the source string
from_end_posposition where conversion stopped in the source string
endend of the source string
count_spacestreat trailing spaces as important data
cscharacter set of the string
Returns:
TYPE_OK, TYPE_NOTE_TRUNCATED, TYPE_WARN_TRUNCATED
uint32 Field_longstr::max_data_length ( ) const [virtual]

Get the maximum size of the data in packed format.

Returns:
Maximum data length of the field when packed using the Field::pack() function.

Reimplemented from Field.

Reimplemented in Field_blob.

type_conversion_status Field_longstr::store_decimal ( const my_decimal d) [virtual]

Decimal representation of Field_str.

Parameters:
dvalue for storing
Note:
Field_str is the base class for fields implemeting [VAR]CHAR, VAR[BINARY], BLOB/TEXT, GEOMETRY. String value should be converted to floating point value according our rules, so we use double to store value of decimal in string.
Todo:
use decimal2string?
Return values:
0OK
!=0error

Reimplemented from Field_str.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines