Skip to content

Reexamine BIGINT returning strings #2398

Open
@MadaraUchiha

Description

@MadaraUchiha

Related: #353

Back in 2013 this was a good idea, as BIGINTs would lose precision when converted to JavaScript numbers (which are doubles).

Today we have native BigInt support in JavaScript, can we reconsider returning/accepting BigInts when doing database operations with the BIGINT type?

Pros and cons as far as I can tell:

Pros:

  • More accurate data representation
  • Easier client-side processing (can use real math operations on BigInts)

Cons:

  • Breaking change
  • BigInt is not serializable to JSON, extra work for database clients is required for that.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions