StringColumnSpec

final class lsst.daf.butler.column_spec.StringColumnSpec(*, name: str, doc: str = '', type: Literal['string'] = 'string', nullable: bool = True, length: int)

Bases: _BaseColumnSpec

Description of a string column.

Attributes Summary

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Methods Summary

serializer()

Return object that converts values of this column to or from serializable format.

to_arrow()

Return an object that converts values of this column to a column in an Arrow table.

to_sql_spec([name_shrinker])

Convert this specification to a SQL-specific one.

Attributes Documentation

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Methods Documentation

serializer() ColumnValueSerializer

Return object that converts values of this column to or from serializable format.

Returns:
serializerColumnValueSerializer

A converter instance.

to_arrow() ToArrow

Return an object that converts values of this column to a column in an Arrow table.

Returns:
converterarrow_utils.ToArrow

A converter object with schema information in Arrow form.

to_sql_spec(name_shrinker: NameShrinker | None = None, **kwargs: Any) ddl.FieldSpec

Convert this specification to a SQL-specific one.

Parameters:
name_shrinkerNameShrinker, optional

Object that should be used to shrink the field name to ensure it fits within database-specific limits.

**kwargs

Forwarded to ddl.FieldSpec.

Returns:
sql_specddl.FieldSpec

A SQL-specific version of this specification.