TMMColumnInfo

Declared in: EDBMMUtils

TMMColumnInfo = record
  // Identity
  ColumnName      : string;
  OrdinalPosition : Integer;
  SourceName      : string;
  SourceTable     : string;

  // MySQL type -- raw IS fields
  DataType        : string;
  ColumnType      : string;

  // Size and scale (0 when not applicable for the type)
  Size  : Int64;
  Scale : Integer;

  // Nullability and default
  IsNullable   : Boolean;
  HasDefault   : Boolean;
  ColumnDefault: string;

  // Charset / collation (empty for non-text types)
  CharsetName  : string;
  CollationName: string;

  // Key / identity / generated
  PrimaryKeyIndex: Integer;
  IsUnique       : Boolean;
  IsAutoIncrement: Boolean;
  IsGenerated    : Boolean;
  GenerationExpr : string;

  // Miscellaneous
  ColumnComment: string;

  // EDB-equivalent type
  EDBType : string;
  IsBinary: Boolean;

  // Script result fields (0 when populated via the IS path)
  ActualMaxBytes: Int64;
  TruncCap      : Int64;
end;

TMMColumnInfoArray = TArray<TMMColumnInfo>;

Typed column metadata record. Used in two contexts:

Fields

Identity

Field Type Description
ColumnName string Column name as it appears in the EDB result or schema context
OrdinalPosition Integer 1-based position in the table (IS.COLUMNS path)
SourceName string Original MySQL column name before alias substitution or EDB identifier sanitisation; equals ColumnName when no alias is in use
SourceTable string Source table name; equals the queried table for the IS.COLUMNS path

MySQL type

Field Type Description
DataType string Base type from IS: 'varchar', 'bigint', 'blob', etc.
ColumnType string Full type with parameters: 'varchar(255)', 'decimal(10,2)', 'int unsigned', etc.

Size and scale

Both fields are 0 when not applicable for the column’s data type.

Size holds whichever of the three mutually exclusive INFORMATION_SCHEMA.COLUMNS size fields is non-null for the column: CHARACTER_MAXIMUM_LENGTH for string and binary types, NUMERIC_PRECISION for numeric types, and DATETIME_PRECISION for date/time types. Scale is only meaningful for DECIMAL and NUMERIC columns.

Field Type Description
Size Int64 Character length, numeric precision, or datetime fractional-seconds precision
Scale Integer Fractional digits (numeric_scale); meaningful only for DECIMAL/NUMERIC (0 for all other types)

Nullability and default

Field Type Description
IsNullable Boolean IS_NULLABLE = 'YES'
HasDefault Boolean Distinguishes a NULL default from an absent default
ColumnDefault string Default value expression; empty when HasDefault is False

Character set and collation

Both fields are empty for non-text types.

Field Type Description
CharsetName string Character set name
CollationName string Collation name

Key, identity, and generated columns

Field Type Description
PrimaryKeyIndex Integer 1-based position in the PRIMARY KEY; 0 = not part of PK
IsUnique Boolean column_key = 'UNI'
IsAutoIncrement Boolean extra contains 'auto_increment'
IsGenerated Boolean Column is VIRTUAL or STORED generated
GenerationExpr string Generation expression; empty when IsGenerated is False

Miscellaneous

Field Type Description
ColumnComment string Column comment

EDB-equivalent type

Field Type Description
EDBType string ElevateDB-equivalent DDL type string, e.g. 'VARCHAR(255)', 'CLOB', 'INTEGER'
IsBinary Boolean True for the BLOB, BINARY, and VARBINARY type families

Script result fields

These fields are populated only when the record comes from TMMScript.Columns after Execute. They are 0 when the record is populated via the INFORMATION_SCHEMA path (GetColumnInfo, GetTableColumns) or via TMMUpdater.Prepare.

Field Type Description
ActualMaxBytes Int64 Maximum raw byte size seen across all cells in this column for the current result set; 0 for non-BLOB/CLOB columns
TruncCap Int64 Cap threshold in bytes applied when BlobMaxSizeBytes was active and at least one cell was truncated; 0 when no truncation occurred

TMMColumnInfoArray

TMMColumnInfoArray = TArray<TMMColumnInfo>;

Dynamic array of TMMColumnInfo. Returned by TMMConnection.GetTableColumns, TMMScript.Columns, and TMMUpdater.Columns.

See Also

(C) 2026 Easygate, Lda