mysqlx.Column

class mysqlx.Column(col_type: int, catalog: str | None = None, schema: str | None = None, table: str | None = None, original_table: str | None = None, name: str | None = None, original_name: str | None = None, length: int | None = None, collation: int | None = None, fractional_digits: int | None = None, flags: int | None = None, content_type: int | None = 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: str

The character set name.

New in version 8.0.12.

Type:

str

property collation_name: str

The collation name.

New in version 8.0.12.

Type:

str

property column_label: str

The column label.

New in version 8.0.12.

Type:

str

property column_name: str

The column name.

New in version 8.0.12.

Type:

str

property fractional_digits: int

The column fractional digits.

New in version 8.0.12.

Type:

int

get_character_set_name() str

Returns the character set name.

Returns:

The character set name.

Return type:

str

get_collation_name() str

Returns the collation name.

Returns:

The collation name.

Return type:

str

get_column_label() str

Returns the column label.

Returns:

The column label.

Return type:

str

get_column_name() str

Returns the column name.

Returns:

The column name.

Return type:

str

get_fractional_digits() int

Returns the column fractional digits.

Returns:

The column fractional digits.

Return type:

int

get_length() int

Returns the column length.

Returns:

The column length.

Return type:

int

get_proto_type() int

Returns the column proto type.

Returns:

The column proto type.

Return type:

int

get_schema_name() str

Returns the schema name.

Returns:

The schema name.

Return type:

str

get_table_label() str

Returns the table label.

Returns:

The table label.

Return type:

str

get_table_name() str

Returns the table name.

Returns:

The table name.

Return type:

str

get_type() int

Returns the column type.

Returns:

The column type.

Return type:

int

is_bytes() bool

Returns True if is bytes.

Returns:

Returns True if is bytes.

Return type:

bool

is_number_signed() bool

Returns True if is a number signed.

Returns:

Returns True if is a number signed.

Return type:

bool

is_padded() bool | int

Returns True if is padded.

Returns:

Returns True if is padded.

Return type:

bool

property length: int

int. The column length.

New in version 8.0.12.

property schema_name: str

The schema name.

New in version 8.0.12.

Type:

str

property table_label: str

The table label.

New in version 8.0.12.

Type:

str

property table_name: str

The table name.

New in version 8.0.12.

Type:

str

property type: int

The column type.

New in version 8.0.12.

Type:

int