Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Auto convert to JS BigInt when numbers are not safe integer #319

@unknown1337

Description

@unknown1337

Bug report

Describe the bug

A clear and concise description of what the bug is.
type overflow bigint, seems that the client lib cannot handle bigint which causes some unexpected behaviour (overflow?)

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. SQL
    create table test ( myfield int8 ); insert into test (myfield) values (23849208278400758)
  2. JS
import { createClient } from '@supabase/supabase-js'
const supabaseUrl: string = process.env.SUPABASE_URL ?? ''
const supabaseKey: string = process.env.SUPABASE_KEY ?? '' 
supabase = createClient(supabaseUrl, supabaseKey)
  console.log(
    await supabase
      .from('test')
      .select('myfield')
      .eq('myfield', '23849208278400758') // quotes->string as the number wont fit in 32bit mem);
  ); 

Expected behavior

expected result to be 23849208278400758 or "23849208278400758" (automatic type conversion to prevent overflows
observed result 23849208278400760

Screenshots

image

System information

  • OS: [Windows]
  • Browser (if applies chrome
  • Version of supabase-js: 1.35.6"

Additional context

note: causes difficult to find issues
note: root cause of issue unknown (dep?).
quasar v2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions