Skip to content

BaseMetaDataColumn does not retrieve Identity flag #403

@etylermoss

Description

@etylermoss

Issue could be with more than just this flag, untested with others. Looks like the column size (nvarchar(x)) is also incorrect?

client.execute("
    CREATE TABLE [Example]
    (
         ID   INT PRIMARY KEY IDENTITY(1, 1) NOT NULL
        ,Name NVARCHAR(255) NOT NULL
        ,Code NVARCHAR(255)
    );
", &[]).await?;

let table_schema = client.column_metadata("[Example]", &["[ID]", "[Name]", "[Code]"]).await?;

for column in table_schema {
    println!(
        "column: {}, flags: {}, ty: {}",
        column.col_name,
        column.base.flags,
        column.base.ty,
    );
}

Output:

column: ID, flags: UpdateableUnknown, ty: int
column: Name, flags: Updateable, ty: nvarchar(510)
column: Code, flags: Nullable | Updateable, ty: nvarchar(510)

Using column_metadata function from PR #398.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions