geopackage-ts
    Preparing search index...

    Interface ColumnDefinition

    Describes a single column in a GeoPackage user data table schema.

    Column definitions are used when programmatically creating new feature, tile, or attribute tables. They specify the column name, data type, and optional constraints such as nullability, uniqueness, default values, and primary key designation.

    interface ColumnDefinition {
        autoincrement?: boolean;
        dataType: GeoPackageDataType;
        defaultValue?: string | number | null;
        max?: number;
        name: string;
        notNull?: boolean;
        primaryKey?: boolean;
        unique?: boolean;
    }
    Index

    Properties

    autoincrement?: boolean

    Whether this column should auto-increment. Only meaningful when primaryKey is true and the column is of an integer type. Defaults to false if omitted.

    The GeoPackage data type for this column (maps to an SQL type via dataTypeToSqlType).

    defaultValue?: string | number | null

    Default value for the column. Can be a string literal, a number, or null. If omitted, no DEFAULT clause is added.

    max?: number

    Maximum length or size constraint for the column value (e.g., maximum character length for TEXT columns). If omitted, no length limit is applied.

    name: string

    The column name as it will appear in the SQLite table schema.

    notNull?: boolean

    Whether the column has a NOT NULL constraint. Defaults to false if omitted.

    primaryKey?: boolean

    Whether this column is the primary key. Defaults to false if omitted.

    unique?: boolean

    Whether this column has a UNIQUE constraint. Defaults to false if omitted.