mysqlx.Column

class mysqlx.Column(col_type, catalog=None, schema=None, table=None, original_table=None, name=None, original_name=None, length=None, collation=None, fractional_digits=None, flags=None, content_type=None)

Bases: object

Represents meta data for a table column.

Parameters
  • col_type (int) – The column type.

  • catalog (str) – The catalog.

  • schema (str) – The schema name.

  • table (str) – The table name.

  • original_table (str) – The original table name.

  • name (str) – The column name.

  • original_name (str) – The original table name.

  • length (int) – The column length,

  • collation (str) – The collation name.

  • fractional_digits (int) – The fractional digits.

  • flags (int) – The flags.

  • content_type (int) – The content type.

Changed in version 8.0.12.

property character_set_name

The character set name.

New in version 8.0.12.

Type

str

property collation_name

The collation name.

New in version 8.0.12.

Type

str

property column_label

The column label.

New in version 8.0.12.

Type

str

property column_name

The column name.

New in version 8.0.12.

Type

str

property fractional_digits

The column fractional digits.

New in version 8.0.12.

Type

int

get_character_set_name()

Returns the character set name.

Returns

The character set name.

Return type

str

get_collation_name()

Returns the collation name.

Returns

The collation name.

Return type

str

get_column_label()

Returns the column label.

Returns

The column label.

Return type

str

get_column_name()

Returns the column name.

Returns

The column name.

Return type

str

get_fractional_digits()

Returns the column fractional digits.

Returns

The column fractional digits.

Return type

int

get_length()

Returns the column length.

Returns

The column length.

Return type

int

get_proto_type()

Returns the column proto type.

Returns

The column proto type.

Return type

int

get_schema_name()

Returns the schema name.

Returns

The schema name.

Return type

str

get_table_label()

Returns the table label.

Returns

The table label.

Return type

str

get_table_name()

Returns the table name.

Returns

The table name.

Return type

str

get_type()

Returns the column type.

Returns

The column type.

Return type

int

is_bytes()

Returns True if is bytes.

Returns

Returns True if is bytes.

Return type

bool

is_number_signed()

Returns True if is a number signed.

Returns

Returns True if is a number signed.

Return type

bool

is_padded()

Returns True if is padded.

Returns

Returns True if is padded.

Return type

bool

property length

int. The column length.

New in version 8.0.12.

property schema_name

The schema name.

New in version 8.0.12.

Type

str

property table_label

The table label.

New in version 8.0.12.

Type

str

property table_name

The table name.

New in version 8.0.12.

Type

str

property type

The column type.

New in version 8.0.12.

Type

int