Skip to content

SqlColumnMetadata

Source code in docs_src/capo_context/types/sql_column_metadata.py
class SqlColumnMetadata(TypedDict, closed=True):
    name: "capo_context.types.sql_column_name.SqlColumnName"
    """<p>The column name or alias as the engine reports it. Not unique: <code>SELECT a.id, b.id</code> returns two <code>id</code> columns.</p>"""
    type: "capo_context.types.sql_type.SqlType"
    """<p>The column's portable SQL type. It fixes which <code>SqlValue</code> member the column's values use.</p>"""
    type_name: "capo_context.types.sql_type_name.SqlTypeName"
    """<p>The engine's own type, for example <code>Timestamp(MICROSECOND, UTC)</code> or <code>Decimal(12, 2, 128)</code>.</p>"""
    nullable: "bool"
    """<p>Specifies whether the column can hold NULL.</p>"""
    precision: NotRequired["int"]
    """<p>DECIMAL: total digits. TIME and TIMESTAMP: fractional-second digits.</p>"""
    scale: NotRequired["int"]
    """<p>DECIMAL: digits after the decimal point.</p>"""
    time_zone: NotRequired["capo_context.types.sql_time_zone.SqlTimeZone"]
    """<p>TIMESTAMP only: set when the engine stores an instant, for example <code>UTC</code>.</p>"""

name instance-attribute

The column name or alias as the engine reports it. Not unique: SELECT a.id, b.id returns two id columns.

nullable instance-attribute

nullable: bool

Specifies whether the column can hold NULL.

precision instance-attribute

precision: NotRequired[int]

DECIMAL: total digits. TIME and TIMESTAMP: fractional-second digits.

scale instance-attribute

scale: NotRequired[int]

DECIMAL: digits after the decimal point.

time_zone instance-attribute

time_zone: NotRequired[SqlTimeZone]

TIMESTAMP only: set when the engine stores an instant, for example UTC.

type instance-attribute

type: SqlType

The column's portable SQL type. It fixes which SqlValue member the column's values use.

type_name instance-attribute

type_name: SqlTypeName

The engine's own type, for example Timestamp(MICROSECOND, UTC) or Decimal(12, 2, 128).