Skip to content

RFC: Parse TINYINT(1) as bool #1453

Open
@methane

Description

@methane

MySQL doesn't have actual bool type. Boolean is alias of TINYINT(1).

Using TINYINT(1) for regular integer is not so common.
How about treating TINYINT(1) as bool for better experience?

var b any
db.QueryRow("SELECT true").Scan(&b) // b is bool(true), not int64(1).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions