Search
Follow Us

Follow nosqldatabases on Twitter Follow nosqldatabases on Facebook Follow nosqldatabases on Google Buzz Follow nosqldatabases on LinkedIn Follow nosqldatabases on FeedBurner NoSQL presentations on slideshare

Sponsors

Become a sponsor of NoSQLDatabases.com. Contact us to find out how.

Featured Jobs

 

Follow On Facebook
Recent NoSQL News

Advertisments

Entries in Derick Rethans (1)

Wednesday
Aug112010

Goodtimes! 64-bit Integers in MongoDB

Derick Rethans has an interesting article in which he attempts to store 64-bit integers in MongoDB using PHP. There are some pretty interesting caveats not only with MongoDB but PHP as well.

The documentation of the MongoDB PHP driver on types  says (or used to say, depending on when you're reading this) that only the 32-bit signed integer type is supported because "PHP does not support 8 byte integers". That's not quite true. PHP's integer type supports 64-bit on the platforms where the C-data type long  is 64 bits. That is generally on every 64-bit platform (where PHP is compiled for 64 bits); except on Windows, where the C-data type long is always only 32 bits.

In conclusion, Rethans offers some advice for others bravely choosing this path

Getting 64-bit support right with MongoDB can be tricky

Read more: 64-bit integers in MongoDB