-
-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
int64 support #2190
Comments
I believe the best would be adding a new type to handle |
On 64-bit platforms, the driver will store integer values as int32 bson type as long as its value fits into 32 bits. Once the value exceeds the maximum size for 32-bit integers, it is stored as int64 type: https://github.com/mongodb/mongo-php-driver/blob/master/src/bson-encode.c#L33..L37 On 32-bit platforms, the driver always stores integer values as 32-bits. The There is no special handling necessary to get the driver to store a 64-bit value, as long as you are running on a 64-bit platform. |
I want to use int64 fields in my db to do a 64 bitmask permission system (32bits it's quite short for some rare cases, but it append..), by default Field(type="integer") are int32 (checked with mongodb compass), and I need to change it manually to int64.
My server is under Php 64bits version so I can use MongoDB\BSON\Int64, is there an option field or a thing to specify int64 in schema ? Thank you
The text was updated successfully, but these errors were encountered: