You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone!
I am recently working on a project that involves using discord ids (snowflakes) as primary keys.
So that everything works fast, I decided to go with the bigint of postgresql. It will be sufficient until like 2064 or something until discord's snowflakes reach the cap, because they are normally unsigned integers and bigint is a signed one. Anways.
Is it possible to set the "mode" of the bigint to a string? libraries like discord.js parse userids as strings.
It would make my job much easier as I wont have to parse the string to a bigint everytime when I am e.g. doing eq(users.id, BigInt(authUser.id))
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone!
I am recently working on a project that involves using discord ids (snowflakes) as primary keys.
So that everything works fast, I decided to go with the bigint of postgresql. It will be sufficient until like 2064 or something until discord's snowflakes reach the cap, because they are normally unsigned integers and bigint is a signed one. Anways.
Is it possible to set the "mode" of the bigint to a string? libraries like discord.js parse userids as strings.
It would make my job much easier as I wont have to parse the string to a bigint everytime when I am e.g. doing
eq(users.id, BigInt(authUser.id))
Beta Was this translation helpful? Give feedback.
All reactions