Add bigint support #2

Merged
merged 2 commits into from Dec 29, 2011

Conversation

Projects
None yet
2 participants
Contributor

ciaranj commented Dec 28, 2011

Hiyah,

Amusingly my first attempt to use tedious failed at the first hurdle as your (known) issue around numbers greater than 2^53 not being supported (my tables use bigints as their primary keys.)

This pull request contains a very (VERY) rough implementation that returns these values as strings, I'm sure the implementation could be re-written by someone competent, but the tests should still be useful to you :)

ciaranj added some commits Dec 28, 2011

@ciaranj ciaranj Add test for 8 byte wide (non-nullable) Ints
also extends the existing test for nullable variable width integers
cc2ed19
@ciaranj ciaranj Provide (basic/rudimentary/in-efficient) support for 8 byte wide ints…
… (nullable and non-nullable).
94fe00b

@pekim pekim merged commit 94fe00b into tediousjs:master Dec 29, 2011

Collaborator

pekim commented Dec 29, 2011

Thanks for this Ciaran. I've reworked the code a little, but it's still functionally very similar.

The unit tests were very helpful. I've moved them in to their own file, so that the bigint code can be tested independently of row token parsing.

I've also added integration tests for bigint.

Contributor

ciaranj commented Dec 29, 2011

Haha, yeah I see the re-work you've done. That awful while loop stuff was caused by js2coffee, which I used to port my original commit (Javascript) into Coffeescript :) I did mean to go back over that code and swap out the while loops for decrementing for-loops as it was in the original javascript code.

@momow momow pushed a commit to momow/tedious that referenced this pull request Oct 15, 2014

@bretcope bretcope Merge pull request #2 from StackExchange/mock-publisher
OpenRTB and Mock publisher
3e7089e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment